Package it.polimi.ingsw.Model
Class AssistantCard
java.lang.Object
it.polimi.ingsw.Model.AssistantCard
- All Implemented Interfaces:
Serializable
This class represents one of the 10 player owned assistant cards
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprivate final int
private static final long
private boolean
-
Constructor Summary
ConstructorDescriptionAssistantCard
(int priority) Constructs an Assistant card based on its priority. -
Method Summary
Modifier and TypeMethodDescriptionint
Every card has a maximum value for the movement to use inMoveMotherNature
int
Returns the priority of turn linked to the use of the card.boolean
getUsed()
If a card is used in a turn by the player, this flag must be set to true.void
setUsed()
If a card is used in a turn by the player, this flag must be set to true.
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
priority
private final int priority -
used
private boolean used
-
-
Constructor Details
-
AssistantCard
public AssistantCard(int priority) Constructs an Assistant card based on its priority.- Parameters:
priority
- the priority of the card
-
-
Method Details
-
getMaxMovement
public int getMaxMovement()Every card has a maximum value for the movement to use inMoveMotherNature
- Returns:
- an integer value representing max mother nature movement
-
getPriority
public int getPriority()Returns the priority of turn linked to the use of the card.- Returns:
- an integer value representing priority
-
getUsed
public boolean getUsed()If a card is used in a turn by the player, this flag must be set to true.- Returns:
- the used flag of the card
-
setUsed
public void setUsed()If a card is used in a turn by the player, this flag must be set to true.
Use this function to set the value to true. Keep in mind there is no way to revert this flag once set.
-