diff options
author | Ida Massow <massow@informatik.uni-luebeck.de> | 2011-05-21 15:51:36 +0200 |
---|---|---|
committer | Ida Massow <massow@informatik.uni-luebeck.de> | 2011-05-21 15:51:36 +0200 |
commit | 7354002de5e9e57db7a6086c78e65f89a3617849 (patch) | |
tree | a56b67ab0e4e20f4445cbeca0be9a1b97b2932a9 /src/jrummikub/model | |
parent | cb3f9cc011c29e713c14bee92c6bacbc3dbbf379 (diff) | |
download | JRummikub-7354002de5e9e57db7a6086c78e65f89a3617849.tar JRummikub-7354002de5e9e57db7a6086c78e65f89a3617849.zip |
Rauskommen fertig und getestet
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@256 72836036-5685-4462-b002-a69064685172
Diffstat (limited to 'src/jrummikub/model')
-rw-r--r-- | src/jrummikub/model/GameSettings.java | 24 | ||||
-rw-r--r-- | src/jrummikub/model/IPlayer.java | 6 | ||||
-rw-r--r-- | src/jrummikub/model/IRoundState.java | 2 | ||||
-rw-r--r-- | src/jrummikub/model/Player.java | 7 | ||||
-rw-r--r-- | src/jrummikub/model/RoundState.java | 6 |
5 files changed, 26 insertions, 19 deletions
diff --git a/src/jrummikub/model/GameSettings.java b/src/jrummikub/model/GameSettings.java index b5079d4..8ace0fb 100644 --- a/src/jrummikub/model/GameSettings.java +++ b/src/jrummikub/model/GameSettings.java @@ -6,7 +6,7 @@ import java.util.List; /** * The overall game settings */ -public class GameSettings { +public class GameSettings implements IGameSettings { private List<PlayerSettings> players = new ArrayList<PlayerSettings>(); private int initialMeldThreshold; @@ -18,30 +18,26 @@ public class GameSettings { initialMeldThreshold = 30; } - /** - * Returns the list containing the settings of all players - * - * @return the player settings list + /* (non-Javadoc) + * @see jrummikub.model.IGameSettings#getPlayerList() */ + @Override public List<PlayerSettings> getPlayerList() { return players; } - /** - * Sets the initial meld threshold - * - * @param value - * the value to set + /* (non-Javadoc) + * @see jrummikub.model.IGameSettings#setInitialMeldThreshold(int) */ + @Override public void setInitialMeldThreshold(int value) { initialMeldThreshold = value; } - /** - * Returns the initial meld threshold - * - * @return the threshold + /* (non-Javadoc) + * @see jrummikub.model.IGameSettings#getInitialMeldThreshold() */ + @Override public int getInitialMeldThreshold() { return initialMeldThreshold; } diff --git a/src/jrummikub/model/IPlayer.java b/src/jrummikub/model/IPlayer.java index 1ae6f12..6c4a9ae 100644 --- a/src/jrummikub/model/IPlayer.java +++ b/src/jrummikub/model/IPlayer.java @@ -25,4 +25,10 @@ public interface IPlayer { * @return the player settings */ public PlayerSettings getPlayerSettings(); + + /** + * Set if the player laid out + * + */ + void setLaidOut(boolean laidOut); }
\ No newline at end of file diff --git a/src/jrummikub/model/IRoundState.java b/src/jrummikub/model/IRoundState.java index af7a478..aba27af 100644 --- a/src/jrummikub/model/IRoundState.java +++ b/src/jrummikub/model/IRoundState.java @@ -10,7 +10,7 @@ public interface IRoundState { * * @return The game settings */ - public GameSettings getGameSettings(); + public IGameSettings getGameSettings(); /** * Get the current {@link Table} diff --git a/src/jrummikub/model/Player.java b/src/jrummikub/model/Player.java index f482f28..d10992e 100644 --- a/src/jrummikub/model/Player.java +++ b/src/jrummikub/model/Player.java @@ -10,7 +10,7 @@ public class Player implements IPlayer { * Create a new player with a given name and color * * @param settings - * the player settings + * the player settings */ public Player(PlayerSettings settings) { this.settings = settings; @@ -30,6 +30,11 @@ public class Player implements IPlayer { } @Override + public void setLaidOut(boolean laidOut) { + this.laidOut = laidOut; + } + + @Override public PlayerSettings getPlayerSettings() { return settings; } diff --git a/src/jrummikub/model/RoundState.java b/src/jrummikub/model/RoundState.java index 56f7904..63b72ea 100644 --- a/src/jrummikub/model/RoundState.java +++ b/src/jrummikub/model/RoundState.java @@ -5,7 +5,7 @@ import java.util.List; /** Class managing the overall and momentary RoundState */ public class RoundState implements IRoundState { - private GameSettings gameSettings; + private IGameSettings gameSettings; private ITable table; private List<Player> players; @@ -18,7 +18,7 @@ public class RoundState implements IRoundState { * @param gameSettings * the game settings */ - public RoundState(GameSettings gameSettings) { + public RoundState(IGameSettings gameSettings) { this.gameSettings = gameSettings; table = new Table(); @@ -68,7 +68,7 @@ public class RoundState implements IRoundState { } @Override - public GameSettings getGameSettings() { + public IGameSettings getGameSettings() { return gameSettings; } } |