Package it.polimi.ingsw.Model
Class EffectTracker
java.lang.Object
it.polimi.ingsw.Model.EffectTracker
- All Implemented Interfaces:
Serializable
CharacterCard
s may impose some non immediate effects to resolve during the turn. This class aims to keep track of them- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprivate boolean
private OptionalValue<PawnColour>
private boolean
private boolean
private boolean
private static final long
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
enables the alternative teacher assignment algorithm flagvoid
enables the denied tower influence flagvoid
enables the increased influence flagvoid
enables the increased mother nature movement flagboolean
boolean
boolean
boolean
boolean
void
reset()
When called, this method will reset all effects to the disabled state.void
setDeniedPawnColour
(PawnColour pawnColour) sets the deniedPawnColour
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
deniedPawnColour
-
denyTowerInfluence
private boolean denyTowerInfluence -
increasedInfluence
private boolean increasedInfluence -
increasedMotherNatureMovement
private boolean increasedMotherNatureMovement -
alternativeTeacherAssignment
private boolean alternativeTeacherAssignment
-
-
Constructor Details
-
EffectTracker
public EffectTracker()Constructor for the Tracker (all effects are disabled)
-
-
Method Details
-
reset
public void reset()When called, this method will reset all effects to the disabled state. -
enableIncreasedInfluence
public void enableIncreasedInfluence()enables the increased influence flag -
enableDenyTowerInfluence
public void enableDenyTowerInfluence()enables the denied tower influence flag -
enableIncreasedMotherNatureMovement
public void enableIncreasedMotherNatureMovement()enables the increased mother nature movement flag -
enableAlternativeTeacherAssignment
public void enableAlternativeTeacherAssignment()enables the alternative teacher assignment algorithm flag -
isInfluenceIncreased
public boolean isInfluenceIncreased()- Returns:
- value of the increased influence flag
-
isTowerInfluenceDenied
public boolean isTowerInfluenceDenied()- Returns:
- value of the denied tower influence flag
-
isMotherNatureMovementIncreased
public boolean isMotherNatureMovementIncreased()- Returns:
- value of the increased mother nature movement flag
-
isAlternativeTeacherAssignmentEnabled
public boolean isAlternativeTeacherAssignmentEnabled()- Returns:
- value of the alternative teacher assignment algorithm flag
-
isPawnColourDenied
public boolean isPawnColourDenied()- Returns:
- true if the value of the denied
PawnColour
is set
-
getDeniedPawnColour
- Returns:
- the denied
PawnColour
wrapped in aOptionalValue
-
setDeniedPawnColour
sets the deniedPawnColour
- Parameters:
pawnColour
- thePawnColour
to be denied
-