Class Building1

All Implemented Interfaces:
BuildingEffect, Serializable, Cloneable

public class Building1 extends BuildingCard
Building effect that grants a discount of 1 food during the Sustenance Event for each character of the indicated type present in the player's tribe.
See Also:
  • Field Details

    • icon

      private final CharacterType icon
      Character type involved in the building effect.
  • Constructor Details

    • Building1

      public Building1(int era, int price, int prestigeValue, CharacterType icon)
      Creates a building with the specified era, price, prestige value and character type involved in its effect.
      Parameters:
      era - the game era of the building.
      price - the price in food of the building.
      prestigeValue - the number of Prestige Points gained from this building at the end of the game.
      icon - the character type used by the building effect.
    • Building1

      public Building1(String idIMG, int era, int price, int prestigeValue, CharacterType icon)
      Creates a building with the specified image identifier, era, price, prestige value and character type involved in its effect.
      Parameters:
      idIMG - the image identifier of the building.
      era - the game era of the building.
      price - the price in food of the building.
      prestigeValue - the number of Prestige Points gained from this building at the end of the game.
      icon - the character type used by the building effect.
  • Method Details

    • getIcon

      public CharacterType getIcon()
      Returns the character type associated with this building effect.
      Returns:
      the character type associated with this building effect.
    • clone

      public BuildingCard clone()
      Creates a new building instance with the same configuration values as this card.
      Overrides:
      clone in class BuildingCard
      Returns:
      a new building card with the same base properties and icon.
    • 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.