Class Inventor
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.Inventor
- All Implemented Interfaces:
Serializable, Cloneable
Represents an Inventor character card.
An Inventor is a specific type of Character initialized with
CharacterType.INVENTOR.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionInventor(int Era, int icon) Creates an Inventor character card with the specified era and icon value.Inventor(int Era, int icon, int nMin) Creates an Inventor character card with the specified era, icon value, and minimum number of players.Creates an Inventor character card with the specified image id, era and icon value.Creates an Inventor 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 Inventor card.intgetIcon()Returns the icon value of this Inventor card.voidInserts this Inventor card into the specified player's Inventor 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 int iconTheIcons's ID. There are a total of 10 different Icons.
-
-
Constructor Details
-
Inventor
Creates an Inventor character card with the specified era and icon value.- Parameters:
Era- the era of the Inventor card.icon- the icon value of the Inventor card.- Throws:
IllegalArgumentException- ificon < 0oricon > 9.
-
Inventor
Creates an Inventor character card with the specified era, icon value, and minimum number of players.- Parameters:
Era- the era of the Inventor card.icon- the icon value of the Inventor card.nMin- the minimum number of players required for the card.- Throws:
IllegalArgumentException- ificon < 0oricon > 9.
-
Inventor
Creates an Inventor character card with the specified image id, era and icon value.- Parameters:
idIMG- the image identifier of the Inventor card.Era- the era of the Inventor card.icon- the icon value of the Inventor card.- Throws:
IllegalArgumentException- ificon < 0oricon > 9.
-
Inventor
Creates an Inventor character card with the specified image id, era, icon value, and minimum number of players.- Parameters:
idIMG- the image identifier of the Inventor card.Era- the era of the Inventor card.icon- the icon value of the Inventor card.nMin- the minimum number of players required for the card.- Throws:
IllegalArgumentException- ificon < 0oricon > 9.
-
-
Method Details
-
getIcon
public int getIcon()Returns the icon value of this Inventor card.- Returns:
- the icon value of this Inventor card.
-
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 Inventor card into the specified player's Inventor collection.The method also applies the building effects related to inventor pairs and any building effects triggered by character set completion.
-