Kommentare, Kommentare

git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@509 72836036-5685-4462-b002-a69064685172
This commit is contained in:
Ida Massow 2011-06-20 04:39:54 +02:00
parent 477e8e9b82
commit 74d8205f30
18 changed files with 315 additions and 154 deletions

View file

@ -248,6 +248,11 @@ public class GameSettings implements Serializable {
}
/**
* Calculate the total number of stones in game
*
* @return total number of stones
*/
public int getTotalStones() {
return getHighestValue() * getStoneSetNumber()
* getStoneColors().size() + getJokerNumber();

View file

@ -18,7 +18,7 @@ public interface IPlayer extends Serializable {
* Set the current hand of the player
*
* @param hand
* the new hand
* the new hand
*/
public void setHand(IHand hand);
@ -40,16 +40,38 @@ public interface IPlayer extends Serializable {
* Set if the player laid out
*
* @param laidOut
* the player laid out
* the player laid out
*
*/
public void setLaidOut(boolean laidOut);
/**
* Getter for last turn invalid
*
* @return last turn invalid
*/
public boolean wasLastTurnInvalid();
/**
* Sets last turn invalid
*
* @param value
* last turn invalid
*/
public void setLastTurnInvalid(boolean value);
/**
* Gets the number of stones put on table in player's last turn
*
* @return number of stones
*/
public int getLastTurnStoneCount();
/**
* Sets the number of stones out on the table in player's last turn
*
* @param value
* number of stones
*/
public void setLastTurnStoneCount(int value);
}

View file

@ -8,7 +8,7 @@ import jrummikub.util.Pair;
* Interface for the {@link StoneTray} model
*
* @param <E>
* Objects held by the IStoneTray
* Objects held by the IStoneTray
*/
public interface IStoneTray<E extends Sizeable> extends
Iterable<Pair<E, Position>>, Cloneable, Serializable {
@ -17,9 +17,9 @@ public interface IStoneTray<E extends Sizeable> extends
* Adds object to the tray
*
* @param object
* object to add to Hand
* object to add to Hand
* @param position
* {@link Position} to put the object
* {@link Position} to put the object
*/
public void drop(E object, Position position);
@ -27,7 +27,7 @@ public interface IStoneTray<E extends Sizeable> extends
* Returns the position of an object that is already on the tray
*
* @param object
* object whose position is requested
* object whose position is requested
* @return position of the object or null when the object is not on the tray
*/
public Position getPosition(E object);
@ -36,7 +36,7 @@ public interface IStoneTray<E extends Sizeable> extends
* Tries to pick up (remove) a given object
*
* @param object
* object to pick up
* object to pick up
* @return true when the object was successfully removed
*/
public boolean pickUp(E object);
@ -55,6 +55,13 @@ public interface IStoneTray<E extends Sizeable> extends
*/
public int getSize();
/**
* Search for an object within the stone tray
*
* @param object
* object to search for
* @return object found in stone tray
*/
public boolean contains(E object);
}