Class Building10
java.lang.Object
it.polimi.ingsw.gc14.Model.PlayableCard
it.polimi.ingsw.gc14.Model.Cards.BuildingCard
it.polimi.ingsw.gc14.Model.Cards.Building.Effects.Building10
- All Implemented Interfaces:
BuildingEffect, Serializable, Cloneable
At the end of the game, the player gains 6 Prestige Points
for each complete set of character types in their tribe.
A complete set contains one character card of each CharacterType.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intPrestige points granted per complete character set at end of game.Fields inherited from class BuildingCard
effectId, effectType -
Constructor Summary
ConstructorsConstructorDescriptionBuilding10(int era, int price, int prestigeValue) Creates a Building10 card with the specified era, price, and prestige value.Building10(String idIMG, int era, int price, int prestigeValue) Creates a Building10 card with the specified image id, era, price, and prestige value. -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyEffect(Player player) Applies the effect of this building card to the specified player.clone()Creates and returns a copy of this Building10 card.Methods inherited from class BuildingCard
buy, getEffectId, getEffectType, getPrestigeValue, getPrice, toStringBoard, toStringPlayerMethods inherited from class PlayableCard
getEra, getIdIMG
-
Field Details
-
PRESTIGE_PER_CHARACTER_SET
private static final int PRESTIGE_PER_CHARACTER_SETPrestige points granted per complete character set at end of game.- See Also:
-
-
Constructor Details
-
Building10
public Building10(int era, int price, int prestigeValue) Creates a Building10 card with the specified era, price, and prestige value.- Parameters:
era- the era of the building card.price- the price of the building card.prestigeValue- the prestige value of the building card.
-
Building10
Creates a Building10 card with the specified image id, era, price, and prestige value.- 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.
-
-
Method Details
-
clone
Creates and returns a copy of this Building10 card.- Overrides:
clonein classBuildingCard- Returns:
- a clone of this Building10 card.
-
applyEffect
Applies the effect of this building card to the specified player.The effect grants 6 Prestige Points for each complete set of character cards owned by the player, where a complete set contains one card of each
CharacterType.- Overrides:
applyEffectin classBuildingCard- Parameters:
player- the player to whom the effect is applied.- Throws:
IllegalArgumentException- if the player does not own this building card.
-