diff options
Diffstat (limited to 'src/jrummikub')
-rw-r--r-- | src/jrummikub/model/GameSettings.java | 89 |
1 files changed, 89 insertions, 0 deletions
diff --git a/src/jrummikub/model/GameSettings.java b/src/jrummikub/model/GameSettings.java index 0feff26..193188f 100644 --- a/src/jrummikub/model/GameSettings.java +++ b/src/jrummikub/model/GameSettings.java @@ -1,7 +1,11 @@ package jrummikub.model; import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashSet; import java.util.List; +import java.util.Set; +import static jrummikub.model.StoneColor.*; /** * The overall game settings @@ -12,6 +16,10 @@ public class GameSettings { private int initialMeldThreshold; private int jokerPoints; private int jokerNumber; + private int highestCard; + private int stoneSets; + private boolean noLimits; + private Set<StoneColor> stoneColors; /** * Creates new GameSettings with default values @@ -20,6 +28,11 @@ public class GameSettings { initialMeldThreshold = 30; jokerPoints = 50; jokerNumber = 2; + highestCard = 13; + stoneSets = 2; + noLimits = false; + stoneColors = new HashSet<StoneColor>(Arrays.asList(BLACK, BLUE, + ORANGE, RED)); } /** @@ -86,4 +99,80 @@ public class GameSettings { public int getJokerNumber() { return jokerNumber; } + + /** + * Return the highest card value in use + * + * @return highest card value + */ + public int getHighestCard() { + return highestCard; + } + + /** + * Set the highest card value in use + * + * @param highestCard + * highest card value + */ + public void setHighestCard(int highestCard) { + this.highestCard = highestCard; + } + + /** + * Get the number of sets of stones in use + * + * @return sets of stones in use + */ + public int getStoneSets() { + return stoneSets; + } + + /** + * Set the number of sets of stones in use + * + * @param stoneSets + * sets of stones in use + */ + public void setStoneSets(int stoneSets) { + this.stoneSets = stoneSets; + } + + /** + * Use "No-Limits" rules + * + * @return whether No-Limits rules are used + */ + public boolean isNoLimits() { + return noLimits; + } + + /** + * Set whether "No-Limits" rules are used + * + * @param noLimits + * use no limit rules + */ + public void setNoLimits(boolean noLimits) { + this.noLimits = noLimits; + } + + /** + * Get stone colors used + * + * @return used stone colors + */ + public Set<StoneColor> getStoneColors() { + return stoneColors; + } + + /** + * Set stone colors used + * + * @param stoneColors + * used stone colors + */ + public void setStoneColors(Set<StoneColor> stoneColors) { + this.stoneColors = stoneColors; + } } |