Class Hunter

All Implemented Interfaces:
Serializable, Cloneable

public class Hunter extends Character
Represents a Hunter character card.

A Hunter is a specific type of Character initialized with CharacterType.HUNTER.

See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final boolean
    Describes whether the Hunter Icon is present or not.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Hunter(int Era, boolean icon)
    Creates a Hunter character card with the specified era and icon value.
    Hunter(int Era, boolean icon, int nMin)
    Creates a Hunter character card with the specified era, icon value, and minimum number of players.
    Hunter(String idIMG, int Era, boolean icon)
    Creates a Hunter character card with the specified image id, era and icon value.
    Hunter(String idIMG, int Era, boolean icon, int nMin)
    Creates a Hunter character card with the specified image id, era, icon value, and minimum number of players.
  • Method Summary

    Modifier and Type
    Method
    Description
    Creates and returns a copy of this Hunter card.
    boolean
    Returns whether this Hunter card has the icon.
    void
    insert(Player player)
    Inserts this Hunter card into the specified player's Hunter collection.
    Returns the representation shown on the board (offer track cards).
    Returns the compact representation shown in the player hand panel.

    Methods inherited from class Character

    getType

    Methods inherited from class TribeCard

    getNMin, isEventCard

    Methods inherited from class PlayableCard

    getEra, getIdIMG

    Methods inherited from class Object

    equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • icon

      private final boolean icon
      Describes whether the Hunter Icon is present or not. Whenever an Hunter with an Hunter Icon is added to the tribe, 1 Food token is awarded for each Hunter in the tribe (with or without an icon).
  • Constructor Details

    • Hunter

      public Hunter(int Era, boolean icon)
      Creates a Hunter character card with the specified era and icon value.
      Parameters:
      Era - the era of the Hunter card.
      icon - the icon value of the Hunter card.
    • Hunter

      public Hunter(int Era, boolean icon, int nMin)
      Creates a Hunter character card with the specified era, icon value, and minimum number of players.
      Parameters:
      Era - the era of the Hunter card.
      icon - the icon value of the Hunter card.
      nMin - the minimum number of players required for the card.
    • Hunter

      public Hunter(String idIMG, int Era, boolean icon)
      Creates a Hunter character card with the specified image id, era and icon value.
      Parameters:
      idIMG - the image identifier of the Hunter card.
      Era - the era of the Hunter card.
      icon - the icon value of the Hunter card.
    • Hunter

      public Hunter(String idIMG, int Era, boolean icon, int nMin)
      Creates a Hunter character card with the specified image id, era, icon value, and minimum number of players.
      Parameters:
      idIMG - the image identifier of the Hunter card.
      Era - the era of the Hunter card.
      icon - the icon value of the Hunter card.
      nMin - the minimum number of players required for the card.
  • Method Details

    • getIcon

      public boolean getIcon()
      Returns whether this Hunter card has the icon.
      Returns:
      true if this Hunter card has the icon, false otherwise.
    • toStringPlayer

      public String toStringPlayer()
      Description copied from class: PlayableCard
      Returns the compact representation shown in the player hand panel.
      Specified by:
      toStringPlayer in class PlayableCard
      Returns:
      the player-hand string representation of this card.
    • toStringBoard

      public String toStringBoard()
      Description copied from class: PlayableCard
      Returns the representation shown on the board (offer track cards).
      Specified by:
      toStringBoard in class PlayableCard
      Returns:
      the board string representation of this card.
    • clone

      public Character clone()
      Creates and returns a copy of this Hunter card.
      Specified by:
      clone in class Character
      Returns:
      a clone of this Hunter card.
    • insert

      public void insert(Player player)
      Inserts this Hunter card into the specified player's Hunter collection.

      If this card has the Hunter icon, the player gains 1 food for each Hunter currently in their tribe. The method also applies any building effects triggered by character set completion.

      Specified by:
      insert in class Character
      Parameters:
      player - the player who receives the card.