summaryrefslogtreecommitdiffstats
path: root/src/jrummikub/model
diff options
context:
space:
mode:
authorIda Massow <massow@informatik.uni-luebeck.de>2011-06-20 04:39:54 +0200
committerIda Massow <massow@informatik.uni-luebeck.de>2011-06-20 04:39:54 +0200
commit74d8205f30732a8afd6aa45f859188b0a3d447e5 (patch)
treeee84072fa43cf0342c4d5eb59e232d8c5b4b1802 /src/jrummikub/model
parent477e8e9b82d6bcbec006914a22e05a2c18492869 (diff)
downloadJRummikub-74d8205f30732a8afd6aa45f859188b0a3d447e5.tar
JRummikub-74d8205f30732a8afd6aa45f859188b0a3d447e5.zip
Kommentare, Kommentare
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@509 72836036-5685-4462-b002-a69064685172
Diffstat (limited to 'src/jrummikub/model')
-rw-r--r--src/jrummikub/model/GameSettings.java5
-rw-r--r--src/jrummikub/model/IPlayer.java26
-rw-r--r--src/jrummikub/model/IStoneTray.java17
3 files changed, 41 insertions, 7 deletions
diff --git a/src/jrummikub/model/GameSettings.java b/src/jrummikub/model/GameSettings.java
index 55419a4..dfd391e 100644
--- a/src/jrummikub/model/GameSettings.java
+++ b/src/jrummikub/model/GameSettings.java
@@ -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();
diff --git a/src/jrummikub/model/IPlayer.java b/src/jrummikub/model/IPlayer.java
index a72b002..a88d838 100644
--- a/src/jrummikub/model/IPlayer.java
+++ b/src/jrummikub/model/IPlayer.java
@@ -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);
} \ No newline at end of file
diff --git a/src/jrummikub/model/IStoneTray.java b/src/jrummikub/model/IStoneTray.java
index 437ecda..17e7ae3 100644
--- a/src/jrummikub/model/IStoneTray.java
+++ b/src/jrummikub/model/IStoneTray.java
@@ -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);
} \ No newline at end of file