diff options
Diffstat (limited to 'src/jrummikub/control/RoundControl.java')
-rw-r--r-- | src/jrummikub/control/RoundControl.java | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/jrummikub/control/RoundControl.java b/src/jrummikub/control/RoundControl.java index e10950d..d7a27bb 100644 --- a/src/jrummikub/control/RoundControl.java +++ b/src/jrummikub/control/RoundControl.java @@ -26,7 +26,7 @@ public class RoundControl { private IRoundState roundState; private IView view; private ITable clonedTable; - private Event endRoundEvent = new Event(); + private Event endOfRoundEvent = new Event(); private List<Connection> connections = new ArrayList<Connection>(); private boolean roundFinished; @@ -46,10 +46,10 @@ public class RoundControl { /** * End the round * - * @return endRoundEvent + * @return endOfRoundEvent */ - public IEvent getEndRoundEvent() { - return endRoundEvent; + public IEvent getEndOfRoundEvent() { + return endOfRoundEvent; } /** @@ -134,7 +134,7 @@ public class RoundControl { } else { if (roundState.getActivePlayer() == roundState.getLastPlayer()) { // TODO check who has won - win(); + endOfRound(); } else { roundState.nextPlayer(); } @@ -171,7 +171,7 @@ public class RoundControl { } else { roundState.getActivePlayer().setLaidOut(true); if (roundState.getActivePlayer().getHand().getSize() == 0) { - win(); + endOfRound(); } } } @@ -235,11 +235,11 @@ public class RoundControl { dealStones(count + 3); } - private void win() { + private void endOfRound() { for (Connection c : connections) { c.remove(); } - endRoundEvent.emit(); + endOfRoundEvent.emit(); view.enableWinPanel(true); roundFinished = true; } |