Prevent repeatable conceding (fixes #1526).

This commit is contained in:
rkfg 2016-03-03 11:43:50 +03:00
parent 527bb2a492
commit e2b62fecd8

View file

@ -1192,7 +1192,7 @@ public abstract class GameImpl implements Game, Serializable {
@Override
public synchronized void concede(UUID playerId) {
Player player = state.getPlayer(playerId);
if (player != null) {
if (player != null && !player.hasLost()) {
logger.debug("Player " + player.getName() + " concedes game " + this.getId());
fireInformEvent(player.getLogName() + " has conceded.");
player.concede(this);