Class Hunter
java.lang.Object
it.polimi.ingsw.gc14.Model.PlayableCard
it.polimi.ingsw.gc14.Model.Cards.TribeCard
it.polimi.ingsw.gc14.Model.Cards.TribeCards.Character
it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters.Hunter
- All Implemented Interfaces:
Serializable, Cloneable
Represents a Hunter character card.
A Hunter is a specific type of Character initialized with
CharacterType.HUNTER.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final booleanDescribes whether theHunter Iconis present or not. -
Constructor Summary
ConstructorsConstructorDescriptionHunter(int Era, boolean icon) Creates a Hunter character card with the specified era and icon value.Hunter(int Era, boolean icon, int nMin) Creates a Hunter character card with the specified era, icon value, and minimum number of players.Creates a Hunter character card with the specified image id, era and icon value.Creates a Hunter character card with the specified image id, era, icon value, and minimum number of players. -
Method Summary
Modifier and TypeMethodDescriptionclone()Creates and returns a copy of this Hunter card.booleangetIcon()Returns whether this Hunter card has the icon.voidInserts this Hunter card into the specified player's Hunter collection.Returns the representation shown on the board (offer track cards).Returns the compact representation shown in the player hand panel.Methods inherited from class TribeCard
getNMin, isEventCardMethods inherited from class PlayableCard
getEra, getIdIMG
-
Field Details
-
icon
private final boolean iconDescribes whether theHunter Iconis present or not. Whenever anHunterwith anHunter Iconis added to the tribe, 1Food tokenis awarded for each Hunter in the tribe (with or without an icon).
-
-
Constructor Details
-
Hunter
public Hunter(int Era, boolean icon) Creates a Hunter character card with the specified era and icon value.- Parameters:
Era- the era of the Hunter card.icon- the icon value of the Hunter card.
-
Hunter
public Hunter(int Era, boolean icon, int nMin) Creates a Hunter character card with the specified era, icon value, and minimum number of players.- Parameters:
Era- the era of the Hunter card.icon- the icon value of the Hunter card.nMin- the minimum number of players required for the card.
-
Hunter
Creates a Hunter character card with the specified image id, era and icon value.- Parameters:
idIMG- the image identifier of the Hunter card.Era- the era of the Hunter card.icon- the icon value of the Hunter card.
-
Hunter
Creates a Hunter character card with the specified image id, era, icon value, and minimum number of players.- Parameters:
idIMG- the image identifier of the Hunter card.Era- the era of the Hunter card.icon- the icon value of the Hunter card.nMin- the minimum number of players required for the card.
-
-
Method Details
-
getIcon
public boolean getIcon()Returns whether this Hunter card has the icon.- Returns:
trueif this Hunter card has the icon,falseotherwise.
-
toStringPlayer
Description copied from class:PlayableCardReturns the compact representation shown in the player hand panel.- Specified by:
toStringPlayerin classPlayableCard- Returns:
- the player-hand string representation of this card.
-
toStringBoard
Description copied from class:PlayableCardReturns the representation shown on the board (offer track cards).- Specified by:
toStringBoardin classPlayableCard- Returns:
- the board string representation of this card.
-
clone
-
insert
Inserts this Hunter card into the specified player's Hunter collection.If this card has the Hunter icon, the player gains 1 food for each Hunter currently in their tribe. The method also applies any building effects triggered by character set completion.
-