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

    for (Player player : this.players) {

      player.tick();
    }
  }
Ejemplo 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;
 }
Ejemplo 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;
  }
Ejemplo n.º 4
0
  public boolean isOnePlayerSufferedEnough() {

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

    return false;
  }