Package it.polimi.ingsw.Model
Class StatefulEffect
java.lang.Object
it.polimi.ingsw.Model.CharacterCard
it.polimi.ingsw.Model.StatefulEffect
- All Implemented Interfaces:
Serializable
A
CharacterCard
that implements an effect linked to some internal state- See Also:
-
Field Summary
Fields inherited from class it.polimi.ingsw.Model.CharacterCard
context, cost, id, timeUsed
-
Constructor Summary
ConstructorDescriptionStatefulEffect
(int id, int cost, StateType stateType, Model context) Construct a stateful card object -
Method Summary
Methods inherited from class it.polimi.ingsw.Model.CharacterCard
checkInput, getCost, getId, getTimeUsed, overridableCheckInput, unsafeApplyEffect, unsafeUseCard
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
stateType
-
-
Constructor Details
-
StatefulEffect
Construct a stateful card object- Parameters:
id
- the ID of the cardcost
- the cost of the cardstateType
- theStateType
of the cardcontext
- a reference to the Model, to apply the effect.
-
-
Method Details
-
getState
Get the internal state of the card. UsegetStateType()
to know how to interpret it.- Returns:
- a
List
of the state objects
-
getStateType
Get the type of state this card uses.- Returns:
- a variant of
StateType
-