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:
parent
ffeefad257
commit
5029ff206a
1 changed files with 10 additions and 4 deletions
|
@ -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
|
||||
|
|
Reference in a new issue