Nochmal, git ist schwierig
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@258 72836036-5685-4462-b002-a69064685172
This commit is contained in:
parent
941c81497a
commit
9290db240a
2 changed files with 63 additions and 0 deletions
34
mock/jrummikub/model/MockGameSettings.java
Normal file
34
mock/jrummikub/model/MockGameSettings.java
Normal file
|
@ -0,0 +1,34 @@
|
|||
package jrummikub.model;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.awt.Color;
|
||||
|
||||
public class MockGameSettings implements IGameSettings {
|
||||
List<PlayerSettings> players = new ArrayList<PlayerSettings>();
|
||||
int initialMeldThreshold;
|
||||
|
||||
public MockGameSettings() {
|
||||
players.add(new PlayerSettings("Bennet", Color.BLUE));
|
||||
players.add(new PlayerSettings("Matze", Color.BLACK));
|
||||
players.add(new PlayerSettings("Ida", Color.RED));
|
||||
players.add(new PlayerSettings("Jannis", Color.PINK));
|
||||
initialMeldThreshold=30;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PlayerSettings> getPlayerList() {
|
||||
return players;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setInitialMeldThreshold(int value) {
|
||||
initialMeldThreshold = value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInitialMeldThreshold() {
|
||||
return initialMeldThreshold;
|
||||
}
|
||||
|
||||
}
|
29
src/jrummikub/model/IGameSettings.java
Normal file
29
src/jrummikub/model/IGameSettings.java
Normal file
|
@ -0,0 +1,29 @@
|
|||
package jrummikub.model;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface IGameSettings {
|
||||
|
||||
/**
|
||||
* Returns the list containing the settings of all players
|
||||
*
|
||||
* @return the player settings list
|
||||
*/
|
||||
public List<PlayerSettings> getPlayerList();
|
||||
|
||||
/**
|
||||
* Sets the initial meld threshold
|
||||
*
|
||||
* @param value
|
||||
* the value to set
|
||||
*/
|
||||
public void setInitialMeldThreshold(int value);
|
||||
|
||||
/**
|
||||
* Returns the initial meld threshold
|
||||
*
|
||||
* @return the threshold
|
||||
*/
|
||||
public int getInitialMeldThreshold();
|
||||
|
||||
}
|
Reference in a new issue