diff options
author | Ida Massow <massow@informatik.uni-luebeck.de> | 2011-05-04 19:24:51 +0200 |
---|---|---|
committer | Ida Massow <massow@informatik.uni-luebeck.de> | 2011-05-04 19:24:51 +0200 |
commit | 3c2950250631abdc82cf48f044ee4ad11ab3c6a1 (patch) | |
tree | e3798d4e27ec1a82d86b4d6dd2d8479e29cebc14 /src/jrummikub | |
parent | 6e9c1b539b412dc08716eb3f88adb53b3021a27b (diff) | |
download | JRummikub-3c2950250631abdc82cf48f044ee4ad11ab3c6a1.tar JRummikub-3c2950250631abdc82cf48f044ee4ad11ab3c6a1.zip |
Dealen fertig und getestet
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@117 72836036-5685-4462-b002-a69064685172
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() { |