From f3f8ffe4621e91d33732bba9e103ff790a16c7b3 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Mon, 20 Jun 2011 03:59:04 +0200 Subject: Added NetworkGameControl git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@503 72836036-5685-4462-b002-a69064685172 --- src/jrummikub/model/IRoundState.java | 4 +++- src/jrummikub/model/RoundState.java | 9 ++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) (limited to 'src/jrummikub/model') 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 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(); @@ -118,4 +120,9 @@ public class RoundState implements IRoundState { public void nextTurn() { turnNumber++; } + + @Override + public GameState getGameState() { + return gameState; + } } -- cgit v1.2.3