Package it.polimi.ingsw.Model
Class EffectTracker
java.lang.Object
it.polimi.ingsw.Model.EffectTracker
- All Implemented Interfaces:
Serializable
CharacterCards may impose some non immediate effects to resolve during the turn. This class aims to keep track of them- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate OptionalValue<PawnColour>private booleanprivate booleanprivate booleanprivate static final long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidenables the alternative teacher assignment algorithm flagvoidenables the denied tower influence flagvoidenables the increased influence flagvoidenables the increased mother nature movement flagbooleanbooleanbooleanbooleanbooleanvoidreset()When called, this method will reset all effects to the disabled state.voidsetDeniedPawnColour(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
PawnColouris set
-
getDeniedPawnColour
- Returns:
- the denied
PawnColourwrapped in aOptionalValue
-
setDeniedPawnColour
sets the deniedPawnColour- Parameters:
pawnColour- thePawnColourto be denied
-