mirror of
https://github.com/correl/mage.git
synced 2024-11-15 19:19:33 +00:00
* Match - Handling of building player names chnaged to fix out of memory error.
This commit is contained in:
parent
8c22756d9e
commit
8a8dea1f26
1 changed files with 11 additions and 1 deletions
|
@ -294,7 +294,17 @@ 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());
|
||||||
|
if (counter > 10) {
|
||||||
|
logger.error("Can't get no correct player info from game");
|
||||||
|
logger.debug("- matchId: " + this.getId());
|
||||||
|
logger.debug("- gameId: " + game.getId());
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
for (MatchPlayer matchPlayer:this.getPlayers()) {
|
||||||
|
sb.append(matchPlayer.getName()).append(" - " );
|
||||||
|
}
|
||||||
|
logger.debug("- players: " + sb.toString());
|
||||||
|
break;
|
||||||
|
}
|
||||||
} while(!currentPlayer.getId().equals(game.getStartingPlayerId()));
|
} while(!currentPlayer.getId().equals(game.getStartingPlayerId()));
|
||||||
} else {
|
} else {
|
||||||
playersInfo.append("[got no players]");
|
playersInfo.append("[got no players]");
|
||||||
|
|
Loading…
Reference in a new issue