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
|
@Override
|
||||||
public boolean hasLost(Player player) {
|
public boolean hasLost(Player player) {
|
||||||
|
|
||||||
|
if (this.getGame().getRound() >= MIN_ROUND_FOR_WIN) {
|
||||||
if (isCompleted())
|
if (isCompleted())
|
||||||
return player.equals(getWinner());
|
return player.equals(getWinner());
|
||||||
|
return player.getNumRegions(getGame()) < 1;
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue