Esempio n. 1
0
  @Override
  public void tick() {

    for (Player player : this.players) {

      player.tick();
    }
  }
Esempio n. 2
0
 /**
  * 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;
 }
Esempio n. 3
0
  /**
   * 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;
  }
Esempio n. 4
0
  public boolean isOnePlayerSufferedEnough() {

    for (Player player : this.players) {
      if (player.isPlayerSufferedEnough()) {
        return true;
      }
    }

    return false;
  }