Fixed player leaving/conceding handling.

This commit is contained in:
LevelX2 2017-10-21 16:13:45 +02:00
parent 79d4c07d20
commit 58d3fc2328
21 changed files with 553 additions and 463 deletions

View file

@ -2039,9 +2039,9 @@ public abstract class PlayerImpl implements Player, Serializable {
@Override
public void concede(Game game) {
game.gameOver(playerId);
game.setConcedingPlayer(playerId);
lost(game);
this.left = true;
// this.left = true;
}
@Override
@ -2136,7 +2136,7 @@ public abstract class PlayerImpl implements Player, Serializable {
// for draw - first all players that have lost have to be set to lost
if (!hasLeft()) {
logger.debug("Game over playerId: " + playerId);
game.gameOver(playerId);
game.setConcedingPlayer(playerId);
}
}
@ -2197,7 +2197,7 @@ public abstract class PlayerImpl implements Player, Serializable {
this.draws = true;
game.fireEvent(GameEvent.getEvent(GameEvent.EventType.DRAW_PLAYER, null, null, playerId));
game.informPlayers("For " + this.getLogName() + " the game is a draw.");
game.gameOver(playerId);
game.setConcedingPlayer(playerId);
}
}
@ -3578,6 +3578,11 @@ public abstract class PlayerImpl implements Player, Serializable {
abort = false;
}
@Override
public void signalPlayerConcede() {
}
@Override
public boolean scry(int value, Ability source,
Game game