diff options
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; } } |