From 3c2950250631abdc82cf48f044ee4ad11ab3c6a1 Mon Sep 17 00:00:00 2001 From: Ida Massow Date: Wed, 4 May 2011 19:24:51 +0200 Subject: Dealen fertig und getestet git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@117 72836036-5685-4462-b002-a69064685172 --- src/jrummikub/control/RoundControl.java | 13 ++++++++++++- src/jrummikub/model/GameState.java | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) (limited to 'src/jrummikub') 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() { -- cgit v1.2.3