@Override public void tick() { for (Player player : this.players) { player.tick(); } }
/** * Returns the player in the specific point. If there are no player found, returns null. * * @param p Point to search player * @return Player at the point or null */ public String getPlayerByPoint(Point p) { for (Player player : this.players) { if (player.contains(p)) { return player.getPlayerName(); } } return null; }
/** * Returns the player object by his name * * @param playerName * @return the player object */ public Player getPlayer(String playerName) { for (Player player : this.players) { if (player.getPlayerName().equals(playerName)) { return player; } } return null; }
public boolean isOnePlayerSufferedEnough() { for (Player player : this.players) { if (player.isPlayerSufferedEnough()) { return true; } } return false; }