Class Building11
java.lang.Object
it.polimi.ingsw.gc14.Model.PlayableCard
it.polimi.ingsw.gc14.Model.Cards.BuildingCard
it.polimi.ingsw.gc14.Model.Cards.Building.Effects.Building11
- All Implemented Interfaces:
BuildingEffect, Serializable, Cloneable
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 Summary
FieldsModifier and TypeFieldDescriptionprivate final CharacterTypeThe character type involved in this building effect.private final intThe prestige multiplier applied per matching character card at end of game.Fields inherited from class BuildingCard
effectId, effectType -
Constructor Summary
ConstructorsConstructorDescriptionBuilding11(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.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. -
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 Building11 card.getIcon()Returns the CharacterType associated with this building card effect.intReturns the prestige multiplier associated with this building card 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
buy, getEffectId, getEffectType, getPrestigeValue, getPriceMethods inherited from class PlayableCard
getEra, getIdIMG
-
Field Details
-
characterType
The character type involved in this building effect. -
prestigeMul
private final int prestigeMulThe prestige multiplier applied per matching character card at end of game.
-
-
Constructor Details
-
Building11
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
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
Creates and returns a copy of this Building11 card.- Overrides:
clonein classBuildingCard- Returns:
- a clone of this Building11 card.
-
applyEffect
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:
applyEffectin classBuildingCard- Parameters:
player- the player to whom the effect is applied.- Throws:
IllegalArgumentException- if the player does not own this building card.
-
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.
-