Fixed out of stones rules

git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@331 72836036-5685-4462-b002-a69064685172
This commit is contained in:
Jannis Harder 2011-05-30 21:04:43 +02:00
parent d25a73167c
commit d66d73ea8f
2 changed files with 3 additions and 2 deletions

View file

@ -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();

View file

@ -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();