diff options
Diffstat (limited to 'src/jrummikub/model/GameSettings.java')
-rw-r--r-- | src/jrummikub/model/GameSettings.java | 47 |
1 files changed, 29 insertions, 18 deletions
diff --git a/src/jrummikub/model/GameSettings.java b/src/jrummikub/model/GameSettings.java index 2446333..8291cfb 100644 --- a/src/jrummikub/model/GameSettings.java +++ b/src/jrummikub/model/GameSettings.java @@ -50,8 +50,8 @@ public class GameSettings implements Serializable { totalTime = 60; noLimits = false; seeHandSize = false; - stoneColors = new HashSet<StoneColor>(Arrays.asList(BLACK, BLUE, - ORANGE, RED)); + stoneColors = new HashSet<StoneColor>(Arrays.asList(BLACK, BLUE, ORANGE, + RED)); } /** @@ -67,7 +67,7 @@ public class GameSettings implements Serializable { * Sets the initial meld threshold * * @param value - * the value to set + * the value to set */ public void setInitialMeldThreshold(int value) { initialMeldThreshold = value; @@ -86,7 +86,7 @@ public class GameSettings implements Serializable { * Sets the points counted for a joker * * @param value - * the value to set + * the value to set */ public void setJokerPoints(int value) { jokerPoints = value; @@ -105,7 +105,7 @@ public class GameSettings implements Serializable { * Sets the number of jokers in game * * @param value - * how many jokers will be used + * how many jokers will be used */ public void setJokerNumber(int value) { jokerNumber = value; @@ -133,7 +133,7 @@ public class GameSettings implements Serializable { * Set the highest stone value in use * * @param highestValue - * highest stone value + * highest stone value */ public void setHighestValue(int highestValue) { this.highestValue = highestValue; @@ -152,7 +152,7 @@ public class GameSettings implements Serializable { * Set the number of sets of stones in use * * @param stoneSets - * sets of stones in use + * sets of stones in use */ public void setStoneSetNumber(int stoneSets) { this.stoneSetNumber = stoneSets; @@ -171,7 +171,7 @@ public class GameSettings implements Serializable { * Setter for the time for a turn * * @param totalTime - * for a turn + * for a turn */ public void setTotalTime(int totalTime) { this.totalTime = totalTime; @@ -186,24 +186,35 @@ public class GameSettings implements Serializable { return noLimits; } - public boolean doSeeHandSize() { + /** + * Returns the visibility of the hand size + * + * @return whether the hand size is visible + */ + public boolean getSeeHandSize() { return seeHandSize; } /** + * Set whether the hand size is visible + * + * @param see + * whether the hand size is visible + */ + public void setSeeHandSize(boolean see) { + seeHandSize = see; + } + + /** * Set whether "No-Limits" rules are used * * @param noLimits - * use no limit rules + * use no limit rules */ public void setNoLimits(boolean noLimits) { this.noLimits = noLimits; } - public void setSeeHandSize(boolean see) { - seeHandSize = see; - } - /** * Get stone colors used * @@ -217,7 +228,7 @@ public class GameSettings implements Serializable { * Set stone colors used * * @param stoneColors - * used stone colors + * used stone colors */ public void setStoneColors(Set<StoneColor> stoneColors) { this.stoneColors = new HashSet<StoneColor>(stoneColors); @@ -236,7 +247,7 @@ public class GameSettings implements Serializable { * Set number of stones dealt at game start * * @param number - * how many Stones will be dealt initially + * how many Stones will be dealt initially */ public void setNumberOfStonesDealt(int number) { numberOfStonesDealt = number; @@ -264,7 +275,7 @@ public class GameSettings implements Serializable { * @return total number of stones */ public int getTotalStones() { - return getHighestValue() * getStoneSetNumber() - * getStoneColors().size() + getJokerNumber(); + return getHighestValue() * getStoneSetNumber() * getStoneColors().size() + + getJokerNumber(); } } |