Dealen fertig und getestet

git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@117 72836036-5685-4462-b002-a69064685172
This commit is contained in:
Ida Massow 2011-05-04 19:24:51 +02:00
parent 6e9c1b539b
commit 3c29502506
2 changed files with 13 additions and 2 deletions

View file

@ -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() {

View file

@ -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() {