summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/jrummikub/control/RoundControl.java3
-rw-r--r--test/jrummikub/control/RoundControlTest.java2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/jrummikub/control/RoundControl.java b/src/jrummikub/control/RoundControl.java
index e1d2e97..5874532 100644
--- a/src/jrummikub/control/RoundControl.java
+++ b/src/jrummikub/control/RoundControl.java
@@ -165,7 +165,8 @@ public class RoundControl {
if (roundState.getLastPlayer() == null) {
if (roundState.getGameHeap().getSize() == 0) {
- roundState.setLastPlayer(roundState.getNthNextPlayer(-1));
+ roundState.setLastPlayer(roundState.getNthNextPlayer(0));
+ roundState.nextPlayer();
roundState.nextTurn();
} else {
roundState.nextPlayer();
diff --git a/test/jrummikub/control/RoundControlTest.java b/test/jrummikub/control/RoundControlTest.java
index 8c8c67d..fd2d3fb 100644
--- a/test/jrummikub/control/RoundControlTest.java
+++ b/test/jrummikub/control/RoundControlTest.java
@@ -771,7 +771,7 @@ public class RoundControlTest {
view.startTurnEvent.emit();
view.playerPanel.endTurnEvent.emit(); // player 1 draws a card here
- assertSame(player1, roundState.getActivePlayer());
+ assertSame(player1, roundState.getNthNextPlayer(-1));
for (int i = 0; i < 4; i++) {
view.startTurnEvent.emit();