Checking whether redealing is allowed

git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@290 72836036-5685-4462-b002-a69064685172
This commit is contained in:
Jannis Harder 2011-05-27 18:55:19 +02:00
parent ffeefad257
commit 5029ff206a

View file

@ -70,8 +70,6 @@ public class RoundControl {
}
}));
prepareTurn();
}
@ -81,11 +79,19 @@ public class RoundControl {
view.getTablePanel().setStoneSets(clonedTable);
view.setCurrentPlayerName(roundState.getActivePlayer()
.getPlayerSettings().getName());
}
private void startTurn() {
boolean inspectOnly = roundState.getTurnNumber() < 1;
boolean mayRedeal = inspectOnly
&& roundState.getActivePlayer().getHand()
.getIdenticalStoneCount() >= 3;
view.getPlayerPanel().setEndTurnMode(inspectOnly, mayRedeal);
TurnControl turnControl = new TurnControl(roundState.getActivePlayer()
.getHand(), clonedTable, view, roundState.getTurnNumber() < 1);
.getHand(), clonedTable, view, inspectOnly);
turnControl.getEndOfTurnEvent().add(new IListener() {
@Override