/** * Clear this round from this list of entities to deploy */ public void clearDeploymentThisRound() { deploymentTable.remove(new Integer(getRoundCount())); }
/** * Check to see if we should deploy this round */ public boolean shouldDeployThisRound() { return shouldDeployForRound(getRoundCount()); }
/** * Checks to see if we've past our deployment completion */ public void checkForCompleteDeployment() { setDeploymentComplete(lastDeploymentRound < getRoundCount()); }
public int getNextDeployableEntityNum(GameTurn turn, int start) { if (start >= 0) { for (int i = start; i < entities.size(); i++) { final Entity entity = entities.get(i); if (turn.isValidEntity(entity, this) && entity.shouldDeploy(getRoundCount())) { return entity.getId(); } } } return getFirstDeployableEntityNum(turn); }
public int getFirstDeployableEntityNum(GameTurn turn) { // Repeat the logic from getFirstEntityNum. if (turn == null) { return -1; } for (Entity entity : entities) { if (turn.isValidEntity(entity, this) && entity.shouldDeploy(getRoundCount())) { return entity.getId(); } } return -1; }
public boolean gameTimerIsExpired() { return ((getOptions().booleanOption(OptionsConstants.VICTORY_USE_GAME_TURN_LIMIT)) && (getRoundCount() == getOptions() .intOption(OptionsConstants.VICTORY_GAME_TURN_LIMIT))); }