diff options
author | Jannis Harder <harder@informatik.uni-luebeck.de> | 2011-05-29 19:14:28 +0200 |
---|---|---|
committer | Jannis Harder <harder@informatik.uni-luebeck.de> | 2011-05-29 19:14:28 +0200 |
commit | f62b953c9e66e622087bdcaf873614b07e89c761 (patch) | |
tree | 8af8cce22256652231a2c5bf6236600e39a070ce /src/jrummikub/model | |
parent | c09a94a359de9f2d13b36dc58b9ac55022379861 (diff) | |
download | JRummikub-f62b953c9e66e622087bdcaf873614b07e89c761.tar JRummikub-f62b953c9e66e622087bdcaf873614b07e89c761.zip |
Added more fields to GameSettings
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@306 72836036-5685-4462-b002-a69064685172
Diffstat (limited to 'src/jrummikub/model')
-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; + } } |