Class Character

All Implemented Interfaces:
Serializable, Cloneable
Direct Known Subclasses:
Artist, Builder, Gatherer, Hunter, Inventor, Shaman

public abstract class Character extends TribeCard implements Cloneable
Abstract base class for all character cards.

A Character is a TribeCard that is not an event card and is associated with a specific CharacterType.

See Also:
  • Field Details

    • type

      private final CharacterType type
      The specific type of this character card.
  • Constructor Details

    • Character

      public Character(int Era, CharacterType type)
      Creates a character card with the specified era and character type.
      Parameters:
      Era - the era of the character card.
      type - the type of the character card.
    • Character

      public Character(String idIMG, int Era, CharacterType type)
      Creates a character card with the specified image id, era and character type.
      Parameters:
      idIMG - the image identifier of the character card.
      Era - the era of the character card.
      type - the type of the character card.
    • Character

      public Character(int Era, CharacterType type, int nMin)
      Creates a character card with the specified era, character type, and minimum number of players.
      Parameters:
      Era - the era of the character card.
      type - the type of the character card.
      nMin - the minimum number of players required for the card.
    • Character

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

    • getType

      public CharacterType getType()
      Returns the type of this character card.
      Returns:
      the type of this character card.
    • clone

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

      public abstract void insert(Player player)
      Inserts this character card into the appropriate collection of the specified player.
      Parameters:
      player - the player who receives the character card.