Improve hasLost detection

This commit is contained in:
joachimschmidt557 2019-03-25 14:07:31 +01:00
parent f49bf02441
commit 632ff28e47

View file

@ -91,8 +91,11 @@ public class CaptureTheFlagGoal extends Goal {
@Override
public boolean hasLost(Player player) {
if (this.getGame().getRound() >= MIN_ROUND_FOR_WIN) {
if (isCompleted())
return player.equals(getWinner());
return player.getNumRegions(getGame()) < 1;
}
return false;