Improve hasLost detection
This commit is contained in:
parent
f49bf02441
commit
632ff28e47
1 changed files with 6 additions and 3 deletions
|
|
@ -91,8 +91,11 @@ public class CaptureTheFlagGoal extends Goal {
|
|||
@Override
|
||||
public boolean hasLost(Player player) {
|
||||
|
||||
if (isCompleted())
|
||||
return player.equals(getWinner());
|
||||
if (this.getGame().getRound() >= MIN_ROUND_FOR_WIN) {
|
||||
if (isCompleted())
|
||||
return player.equals(getWinner());
|
||||
return player.getNumRegions(getGame()) < 1;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue