diff options
Diffstat (limited to 'src/jrummikub')
-rw-r--r-- | src/jrummikub/control/RoundControl.java | 4 | ||||
-rw-r--r-- | src/jrummikub/model/GameState.java | 5 | ||||
-rw-r--r-- | src/jrummikub/model/IGameState.java | 3 |
3 files changed, 2 insertions, 10 deletions
diff --git a/src/jrummikub/control/RoundControl.java b/src/jrummikub/control/RoundControl.java index 231b860..efa6f62 100644 --- a/src/jrummikub/control/RoundControl.java +++ b/src/jrummikub/control/RoundControl.java @@ -66,7 +66,7 @@ public class RoundControl { void deal() { for (int i = 0; i < gameState.getPlayerCount(); i++) { - IHand hand = gameState.getPlayer(i).getHand(); + IHand hand = gameState.getNthNextPlayer(i).getHand(); for (int j = 0; j < 7; j++) { hand.drop(gameState.getGameHeap().drawStone(), new Position(j, 0)); hand.drop(gameState.getGameHeap().drawStone(), new Position(j, 1)); @@ -81,8 +81,6 @@ public class RoundControl { if (clonedTable.isValid()) { gameState.setTable(clonedTable); - System.err.println(gameState.getActivePlayer().getName()); - System.err.println(gameState.getActivePlayer().getHand().getSize()); if (gameState.getActivePlayer().getHand().getSize() == 0) { win(); return; diff --git a/src/jrummikub/model/GameState.java b/src/jrummikub/model/GameState.java index d9f18b3..1f0ef29 100644 --- a/src/jrummikub/model/GameState.java +++ b/src/jrummikub/model/GameState.java @@ -37,11 +37,6 @@ public class GameState implements IGameState { return players.size(); } - @Override - public IPlayer getPlayer(int i) { - return players.get(i); - } - /** Changes the activePlayer to the next {@link Player} in the list */ @Override public void nextPlayer() { diff --git a/src/jrummikub/model/IGameState.java b/src/jrummikub/model/IGameState.java index df98a2c..8e64bc4 100644 --- a/src/jrummikub/model/IGameState.java +++ b/src/jrummikub/model/IGameState.java @@ -3,12 +3,11 @@ package jrummikub.model; public interface IGameState { public ITable getTable(); + public void setTable(ITable table); public int getPlayerCount(); - public IPlayer getPlayer(int i); - /** Changes the activePlayer to the next {@link Player} in the list */ public void nextPlayer(); |