Class Building8
java.lang.Object
it.polimi.ingsw.gc14.Model.PlayableCard
it.polimi.ingsw.gc14.Model.Cards.BuildingCard
it.polimi.ingsw.gc14.Model.Cards.Building.Effects.Building8
- All Implemented Interfaces:
BuildingEffect, Serializable, Cloneable
At the end of the game, you gain double the Prestige Points indicated on the Builder cards in your tribe.
- See Also:
-
Field Summary
Fields inherited from class BuildingCard
effectId, effectType -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyEffect(Player player) Applies the building effect by granting additional Prestige Points equal to the Prestige Value of each Builder card owned by the player.clone()Method to clone the building: it creates an exact copy.Methods inherited from class BuildingCard
buy, getEffectId, getEffectType, getPrestigeValue, getPrice, toStringBoard, toStringPlayerMethods inherited from class PlayableCard
getEra, getIdIMG
-
Constructor Details
-
Building8
public Building8(int era, int price, int prestigeValue) Constructor of the building- 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.
-
Building8
Constructor of the building.- 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.
-
-
Method Details
-
clone
Method to clone the building: it creates an exact copy.- Overrides:
clonein classBuildingCard- Returns:
- The new copy of the building.
-
applyEffect
Applies the building effect by granting additional Prestige Points equal to the Prestige Value of each Builder card owned by the player.This effectively doubles the contribution of Builder cards to the final score.
- Overrides:
applyEffectin classBuildingCard- Parameters:
player- The player who owns the building.- Throws:
IllegalArgumentException- Thrown if the specified player does not own this building.
-