Added a player lost and player won message to the game log.

This commit is contained in:
LevelX2 2013-07-25 15:40:46 +02:00
parent d85070ea4a
commit 9a04fb57cb

View file

@ -1317,6 +1317,7 @@ public abstract class PlayerImpl<T extends PlayerImpl<T>> implements Player, Ser
//20100423 - 603.9
if (!this.wins) {
game.fireEvent(GameEvent.getEvent(GameEvent.EventType.LOST, null, null, playerId));
game.informPlayers(new StringBuilder(this.getName()).append(" has lost the game.").toString());
}
if (!hasLeft()) {
game.leave(playerId);
@ -1350,6 +1351,7 @@ public abstract class PlayerImpl<T extends PlayerImpl<T>> implements Player, Ser
}
}
if (opponentsAlive == 0) {
game.informPlayers(new StringBuilder(this.getName()).append(" has won the game").toString());
this.wins = true;
game.end();
}