diff options
Diffstat (limited to 'src/jrummikub/control/RoundControl.java')
-rw-r--r-- | src/jrummikub/control/RoundControl.java | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/jrummikub/control/RoundControl.java b/src/jrummikub/control/RoundControl.java index aeff095..71980e1 100644 --- a/src/jrummikub/control/RoundControl.java +++ b/src/jrummikub/control/RoundControl.java @@ -264,7 +264,7 @@ public class RoundControl { return TurnControlFactory.getFactory(type).create(); } - void deal() { + protected void deal() { for (int i = 0; i < roundState.getPlayerCount(); i++) { IHand hand = roundState.getNthNextPlayer(i).getHand(); for (int j = 0; j < roundState.getGameSettings().getNumberOfStonesDealt(); j++) { @@ -276,8 +276,9 @@ public class RoundControl { } protected void endOfTurn(InvalidTurnInfo invalidTurnInfo) { - boolean wasHuman = (turnControl instanceof HumanTurnControl); - boolean wasAI = (turnControl instanceof AIControl); + boolean wasAI = turnControl instanceof AIControl; + boolean wasHuman = turnControl instanceof HumanTurnControl; + turnControl = null; view.getTablePanel().setStoneSets(invalidTurnInfo.getTable()); @@ -314,10 +315,13 @@ public class RoundControl { } view.setBottomPanel(BottomPanelType.NONHUMAN_HAND_PANEL); - nextPlayer(); + + if (wasHuman || wasAI) { + nextPlayer(); + } } - private void nextPlayer() { + protected void nextPlayer() { view.setSelectedStones(Collections.<Stone> emptyList()); view.setInvalidStoneSets(Collections.<StoneSet> emptyList()); view.setStoneCollectionHidden(false); |