diff options
Diffstat (limited to 'src/jrummikub/model')
-rw-r--r-- | src/jrummikub/model/IRoundState.java | 4 | ||||
-rw-r--r-- | src/jrummikub/model/RoundState.java | 9 |
2 files changed, 11 insertions, 2 deletions
diff --git a/src/jrummikub/model/IRoundState.java b/src/jrummikub/model/IRoundState.java index d394694..1ac0ac2 100644 --- a/src/jrummikub/model/IRoundState.java +++ b/src/jrummikub/model/IRoundState.java @@ -96,13 +96,15 @@ public interface IRoundState extends Serializable { */ public void setActivePlayerNumber(int i); + public GameState getGameState(); + /** * Gets the number of the current turn. Numbers smaller than one indicate hand * inspection turns * * @return current turn number */ - public abstract int getTurnNumber(); + public int getTurnNumber(); /** * Increments the turn number diff --git a/src/jrummikub/model/RoundState.java b/src/jrummikub/model/RoundState.java index e2125a7..2c50089 100644 --- a/src/jrummikub/model/RoundState.java +++ b/src/jrummikub/model/RoundState.java @@ -7,6 +7,7 @@ public class RoundState implements IRoundState { private static final long serialVersionUID = 8678490099871939059L; private GameSettings gameSettings; + private GameState gameState; private ITable table; private ArrayList<Player> players; @@ -21,8 +22,9 @@ public class RoundState implements IRoundState { * @param gameSettings * the game settings */ - public RoundState(GameSettings gameSettings) { + public RoundState(GameSettings gameSettings, GameState gameState) { this.gameSettings = gameSettings; + this.gameState = gameState; table = new Table(gameSettings); players = new ArrayList<Player>(); @@ -118,4 +120,9 @@ public class RoundState implements IRoundState { public void nextTurn() { turnNumber++; } + + @Override + public GameState getGameState() { + return gameState; + } } |