Class Building1
java.lang.Object
it.polimi.ingsw.gc14.Model.PlayableCard
it.polimi.ingsw.gc14.Model.Cards.BuildingCard
it.polimi.ingsw.gc14.Model.Cards.Building.Effects.Building1
- All Implemented Interfaces:
BuildingEffect, Serializable, Cloneable
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 Summary
FieldsModifier and TypeFieldDescriptionprivate final CharacterTypeCharacter type involved in the building effect.Fields inherited from class BuildingCard
effectId, effectType -
Constructor Summary
ConstructorsConstructorDescriptionBuilding1(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.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. -
Method Summary
Modifier and TypeMethodDescriptionclone()Creates a new building instance with the same configuration values as this card.getIcon()Returns the character type associated with this building effect.Returns the representation shown on the board (offer track cards).Returns the compact representation shown in the player hand panel.Methods inherited from class BuildingCard
applyEffect, buy, getEffectId, getEffectType, getPrestigeValue, getPriceMethods inherited from class PlayableCard
getEra, getIdIMG
-
Field Details
-
icon
Character type involved in the building effect.
-
-
Constructor Details
-
Building1
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
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
Returns the character type associated with this building effect.- Returns:
- the character type associated with this building effect.
-
clone
Creates a new building instance with the same configuration values as this card.- Overrides:
clonein classBuildingCard- Returns:
- a new building card with the same base properties and icon.
-
toStringBoard
Description copied from class:PlayableCardReturns the representation shown on the board (offer track cards).- Overrides:
toStringBoardin classBuildingCard- Returns:
- the board string representation of this card.
-
toStringPlayer
Description copied from class:PlayableCardReturns the compact representation shown in the player hand panel.- Overrides:
toStringPlayerin classBuildingCard- Returns:
- the player-hand string representation of this card.
-