Small fix to won method of PlayerImpl.

This commit is contained in:
LevelX2 2013-04-10 01:13:20 +02:00
parent fe051b5d29
commit 2e34bf356e

View file

@ -1159,8 +1159,8 @@ public abstract class PlayerImpl<T extends PlayerImpl<T>> implements Player, Ser
if (game.getPlayers().size() > 2) {
for (UUID opponentId: game.getOpponents(playerId)) {
Player opponent = game.getPlayer(opponentId);
if (!opponent.hasLost()) {
game.getPlayer(opponentId).lost(game);
if (opponent != null && !opponent.hasLost()) {
opponent.lost(game);
}
}
this.wins = true;