Class Building11

All Implemented Interfaces:
BuildingEffect, Serializable, Cloneable

public class Building11 extends BuildingCard
At the end of the game, the player gains Prestige Points based on the number of cards of the indicated character type in their tribe.

The gained amount is equal to the number of matching character cards multiplied by the building's prestige multiplier.

See Also:
  • Field Details

    • characterType

      private final CharacterType characterType
      The character type involved in this building effect.
    • prestigeMul

      private final int prestigeMul
      The prestige multiplier applied per matching character card at end of game.
  • Constructor Details

    • Building11

      public Building11(int era, int price, int prestigeValue, CharacterType icon, int prestigeMul)
      Creates a Building11 card with the specified era, price, prestige value, character type icon, and prestige multiplier.
      Parameters:
      era - the era of the building card.
      price - the price of the building card.
      prestigeValue - the prestige value of the building card.
      icon - the CharacterType associated with the building card effect.
      prestigeMul - the prestige multiplier of the building card effect.
    • Building11

      public Building11(String idIMG, int era, int price, int prestigeValue, CharacterType icon, int prestigeMul)
      Creates a Building11 card with the specified image id, era, price, prestige value, character type icon, and prestige multiplier.
      Parameters:
      idIMG - the image identifier of the building card.
      era - the era of the building card.
      price - the price of the building card.
      prestigeValue - the prestige value of the building card.
      icon - the CharacterType associated with the building card effect.
      prestigeMul - the prestige multiplier of the building card effect.
  • Method Details

    • getIcon

      public CharacterType getIcon()
      Returns the CharacterType associated with this building card effect.
      Returns:
      the CharacterType associated with this building card effect.
    • getPrestigeMul

      public int getPrestigeMul()
      Returns the prestige multiplier associated with this building card effect.
      Returns:
      the prestige multiplier associated with this building card effect.
    • clone

      public BuildingCard clone()
      Creates and returns a copy of this Building11 card.
      Overrides:
      clone in class BuildingCard
      Returns:
      a clone of this Building11 card.
    • applyEffect

      public void applyEffect(Player player) throws IllegalArgumentException
      Applies the effect of this building card to the specified player. The effect grants prestige points equal to the number of cards of the associated CharacterType owned by the player, multiplied by the prestige multiplier.
      Overrides:
      applyEffect in class BuildingCard
      Parameters:
      player - the player to whom the effect is applied.
      Throws:
      IllegalArgumentException - if the player does not own this building card.
    • toStringBoard

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

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