mirror of
https://github.com/correl/mage.git
synced 2025-01-13 11:01:58 +00:00
Added a player lost and player won message to the game log.
This commit is contained in:
parent
d85070ea4a
commit
9a04fb57cb
1 changed files with 2 additions and 0 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue