Implement team check on challenge selection system

This commit is contained in:
Thanos paravantis 2016-04-19 18:25:36 +03:00
parent 11aef273ba
commit cb4561c561
2 changed files with 10 additions and 2 deletions

View File

@ -307,8 +307,14 @@ public class BawkBawkBattles extends TeamGame implements IThrown
int minCount = settings.getMinPlayers();
int maxCount = settings.getMaxPlayers();
// TODO: Add player team size check.
return participants >= minCount && participants <= maxCount;
boolean criteria = participants >= minCount && participants <= maxCount;
if (settings.isTeamBased())
{
return criteria && getPlayersWithRemainingLives() % 2 == 0;
}
return criteria;
}
private Challenge getChallengeInstance()

View File

@ -94,6 +94,7 @@ public abstract class Challenge implements Listener
*/
public void onStart()
{
}
/**
@ -101,6 +102,7 @@ public abstract class Challenge implements Listener
*/
public void onEnd()
{
}
/**