Interface PlayerIF

All Known Implementing Classes:
Player

public interface PlayerIF
Interface of a player, which only allows to get his data
  • Method Details

    • getPlayerLobby

      PlayerLobby getPlayerLobby()
      Returns:
      Player decontextualized from game. It stores nickname and token chosen by the player
    • getStarter

      CardStarterIF getStarter()
      Returns:
      Starter card of the player. Null if player has not been assigned a starter card yet
    • getPoints

      int getPoints()
      Returns:
      Player's points counter. Initially it will return 0
    • getHandCards

      List<? extends CardPlayableIF> getHandCards()
      Returns:
      Player's hand of cards, which could be CardGold or CardResource. It is empty if the player has no cards yet
    • getPersonalObjective

      CardObjectiveIF getPersonalObjective()
      Returns:
      Player's personal objective. It affects only player's points when the game ends. Null if the personal objective hasn't been initialized yet
    • getPossiblePersonalObjectives

      List<? extends CardObjectiveIF> getPossiblePersonalObjectives()
      Returns:
      the two objective cards among which the player can choose his personal objective. Null if they have not been set yet
    • getField

      FieldIF getField()
      Returns:
      Player's field. Always non-null (it could be an empty field if the player has not played yet)
    • isConnected

      boolean isConnected()
      Returns:
      whether a player is currently connected or not