diff options
Diffstat (limited to 'src/jrummikub')
-rw-r--r-- | src/jrummikub/control/RoundControl.java | 13 | ||||
-rw-r--r-- | src/jrummikub/model/GameState.java | 2 |
2 files changed, 13 insertions, 2 deletions
diff --git a/src/jrummikub/control/RoundControl.java b/src/jrummikub/control/RoundControl.java index ae834b9..ec08050 100644 --- a/src/jrummikub/control/RoundControl.java +++ b/src/jrummikub/control/RoundControl.java @@ -1,6 +1,9 @@ package jrummikub.control; import jrummikub.model.GameState; +import jrummikub.model.IHand; +import jrummikub.model.Player; +import jrummikub.model.Position; import jrummikub.view.IView; public class RoundControl { @@ -17,7 +20,15 @@ public class RoundControl { } void deal() { - + for (int i = 0; i < gameState.getPlayerCount(); i++) { + IHand hand = gameState.getPlayer(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)); + } + } } private void endOfTurn() { diff --git a/src/jrummikub/model/GameState.java b/src/jrummikub/model/GameState.java index 84e206f..e1bd6f3 100644 --- a/src/jrummikub/model/GameState.java +++ b/src/jrummikub/model/GameState.java @@ -19,7 +19,7 @@ public class GameState { players.add(new Player(Color.green)); players.add(new Player(Color.black)); activePlayer = 0; - + gameHeap = new StoneHeap(); } public ITable getTable() { |