summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/jrummikub/control/RoundControl.java14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/jrummikub/control/RoundControl.java b/src/jrummikub/control/RoundControl.java
index 8aed1ce..413211a 100644
--- a/src/jrummikub/control/RoundControl.java
+++ b/src/jrummikub/control/RoundControl.java
@@ -69,8 +69,6 @@ public class RoundControl {
startTurn();
}
}));
-
-
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
@@ -93,7 +99,7 @@ public class RoundControl {
endOfTurn();
}
});
-
+
turnControl.getRedealEvent().add(new IListener() {
@Override
public void handle() {