Fix unexpected challenge end

This commit is contained in:
Thanos Paravantis 2016-06-10 13:33:20 +03:00
parent 52ce640391
commit 47c4e57ce4
1 changed files with 5 additions and 4 deletions

View File

@ -229,7 +229,7 @@ public class BawkBawkBattles extends TeamGame implements IThrown
"Last player with lives wins.", "Last player with lives wins.",
}); });
_settings.setMaxLives(5); _settings.setMaxLives(1);
// Damage = false; // Damage = false;
DamagePvP = false; DamagePvP = false;
@ -424,7 +424,7 @@ public class BawkBawkBattles extends TeamGame implements IThrown
int maxCount = settings.getMaxPlayers(); int maxCount = settings.getMaxPlayers();
boolean criteria = participants >= minCount && participants <= maxCount; boolean criteria = participants >= minCount && participants <= maxCount;
System.out.println("Participants: " + participants); System.out.println("Participants: " + participants);
System.out.println("Min: " + minCount); System.out.println("Min: " + minCount);
System.out.println("Max: " + maxCount); System.out.println("Max: " + maxCount);
@ -957,9 +957,10 @@ public class BawkBawkBattles extends TeamGame implements IThrown
if (getPlayersWithRemainingLives() <= 1) if (getPlayersWithRemainingLives() <= 1)
{ {
if (getPlayersAlive().get(0) != null) if (getPlayersAlive().size() > 0)
{ {
_winners.add(0, getPlayersAlive().get(0)); Player additional = getPlayersAlive().get(0);
_winners.add(0, additional);
} }
if (_winners.size() > 2) if (_winners.size() > 2)