* Match - Fixed a bug during creation of game info that lets game worker die (second try).

This commit is contained in:
LevelX2 2014-10-09 01:30:14 +02:00
parent 581df41ae7
commit 995655aa61

View file

@ -286,6 +286,7 @@ public abstract class MatchImpl implements Match {
if (currentPlayer == null) { if (currentPlayer == null) {
currentPlayer = playerList.getCurrent(game); currentPlayer = playerList.getCurrent(game);
} }
if (currentPlayer != null) {
do { do {
if (counter > 0) { if (counter > 0) {
playersInfo.append(" - "); playersInfo.append(" - ");
@ -293,7 +294,11 @@ public abstract class MatchImpl implements Match {
playersInfo.append(currentPlayer.getName()); playersInfo.append(currentPlayer.getName());
counter++; counter++;
currentPlayer = game.getPlayer(playerList.getNext()); currentPlayer = game.getPlayer(playerList.getNext());
} while(!currentPlayer.getId().equals(game.getStartingPlayerId())); } while(!currentPlayer.getId().equals(game.getStartingPlayerId()));
} else {
playersInfo.append("[got no players]");
}
String state; String state;
String result; String result;