Man kann den Timer einstellen

git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@391 72836036-5685-4462-b002-a69064685172
This commit is contained in:
Ida Massow 2011-06-09 00:11:26 +02:00
parent 45d5b3ae10
commit 8c2e4a7d59
9 changed files with 80 additions and 39 deletions

View file

@ -23,6 +23,7 @@ public class GameSettings implements Serializable {
private int highestValue;
private int stoneSetNumber;
private int numberOfStonesDealt;
private int time;
private boolean noLimits;
private HashSet<StoneColor> stoneColors;
@ -36,9 +37,10 @@ public class GameSettings implements Serializable {
highestValue = 13;
stoneSetNumber = 2;
numberOfStonesDealt = 14;
time = 60;
noLimits = false;
stoneColors = new HashSet<StoneColor>(Arrays.asList(BLACK, BLUE, ORANGE,
RED));
stoneColors = new HashSet<StoneColor>(Arrays.asList(BLACK, BLUE,
ORANGE, RED));
}
/**
@ -54,7 +56,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;
@ -73,7 +75,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;
@ -92,7 +94,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;
@ -120,7 +122,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;
@ -139,12 +141,20 @@ 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;
}
public int getTime() {
return time;
}
public void setTime(int time) {
this.time = time;
}
/**
* Use "No-Limits" rules
*
@ -158,7 +168,7 @@ public class GameSettings implements Serializable {
* 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;
@ -177,7 +187,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);
@ -196,7 +206,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;