Class Character
java.lang.Object
it.polimi.ingsw.gc14.Model.PlayableCard
it.polimi.ingsw.gc14.Model.Cards.TribeCard
it.polimi.ingsw.gc14.Model.Cards.TribeCards.Character
- All Implemented Interfaces:
Serializable, Cloneable
Abstract base class for all character cards.
A Character is a TribeCard that is not an event card and is associated
with a specific CharacterType.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final CharacterTypeThe specific type of this character card. -
Constructor Summary
ConstructorsConstructorDescriptionCharacter(int Era, CharacterType type) Creates a character card with the specified era and character type.Character(int Era, CharacterType type, int nMin) Creates a character card with the specified era, character type, and minimum number of players.Character(String idIMG, int Era, CharacterType type) Creates a character card with the specified image id, era and character type.Character(String idIMG, int Era, CharacterType type, int nMin) Creates a character card with the specified image id, era, character type, and minimum number of players. -
Method Summary
Methods inherited from class TribeCard
getNMin, isEventCardMethods inherited from class PlayableCard
getEra, getIdIMG, toStringBoard, toStringPlayer
-
Field Details
-
type
The specific type of this character card.
-
-
Constructor Details
-
Character
Creates a character card with the specified era and character type.- Parameters:
Era- the era of the character card.type- the type of the character card.
-
Character
Creates a character card with the specified image id, era and character type.- Parameters:
idIMG- the image identifier of the character card.Era- the era of the character card.type- the type of the character card.
-
Character
Creates a character card with the specified era, character type, and minimum number of players.- Parameters:
Era- the era of the character card.type- the type of the character card.nMin- the minimum number of players required for the card.
-
Character
Creates a character card with the specified image id, era, character type, and minimum number of players.- Parameters:
idIMG- the image identifier of the character card.Era- the era of the character card.type- the type of the character card.nMin- the minimum number of players required for the card.
-
-
Method Details
-
getType
Returns the type of this character card.- Returns:
- the type of this character card.
-
clone
-
insert
Inserts this character card into the appropriate collection of the specified player.- Parameters:
player- the player who receives the character card.
-