diff options
Diffstat (limited to 'src/jrummikub/model/GameState.java')
-rw-r--r-- | src/jrummikub/model/GameState.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/jrummikub/model/GameState.java b/src/jrummikub/model/GameState.java index 35e9457..23e51b4 100644 --- a/src/jrummikub/model/GameState.java +++ b/src/jrummikub/model/GameState.java @@ -6,12 +6,13 @@ import java.util.List; /** Class managing the overall and momentary GameState */ public class GameState { - Table table; + ITable table; List<Player> players; int activePlayer; private StoneHeap gameHeap; public GameState() { + table = new Table(); players = new ArrayList<Player>(); players.add(new Player(Color.red)); players.add(new Player(Color.yellow)); @@ -20,6 +21,10 @@ public class GameState { activePlayer = 0; } + public ITable getTable() { + return table; + } + /** Changes the activePlayer to the next {@link Player} in the list */ public void nextPlayer() { activePlayer = (activePlayer + 1) % 4; @@ -32,5 +37,4 @@ public class GameState { public StoneHeap getGameHeap() { return gameHeap; } - } |