Package it.polimi.ingsw.Model
Class Card07
java.lang.Object
it.polimi.ingsw.Model.CharacterCard
it.polimi.ingsw.Model.StatefulEffect
it.polimi.ingsw.Model.Card07
- All Implemented Interfaces:
Serializable
In Setup, draw 6 Students and place them on this card
EFFECT: you may take up to 3 students from this card and replace them with the same number of Students from your Entrance
EFFECT: you may take up to 3 students from this card and replace them with the same number of Students from your Entrance
- See Also:
-
Field Summary
FieldsFields inherited from class it.polimi.ingsw.Model.StatefulEffect
stateTypeFields inherited from class it.polimi.ingsw.Model.CharacterCard
context, cost, id, timeUsed -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetState()Get the internal state of the card.Get the type of state this card uses.Refer to:CharacterCard.overridableCheckInput(CharacterCardInput)for further informationprotected voidRefer to:CharacterCard.unsafeApplyEffect(CharacterCardInput)for further informationMethods inherited from class it.polimi.ingsw.Model.CharacterCard
checkInput, getCost, getId, getTimeUsed, unsafeUseCard
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
students
-
-
Constructor Details
-
Card07
-
-
Method Details
-
getState
Description copied from class:StatefulEffectGet the internal state of the card. UseStatefulEffect.getStateType()to know how to interpret it.- Specified by:
getStatein classStatefulEffect- Returns:
- a
Listof the state objects
-
getStateType
Description copied from class:StatefulEffectGet the type of state this card uses.- Specified by:
getStateTypein classStatefulEffect- Returns:
- a variant of
StateType
-
overridableCheckInput
Refer to:CharacterCard.overridableCheckInput(CharacterCardInput)for further information- Specified by:
overridableCheckInputin classCharacterCard- Parameters:
input- CharacterCardInput should contain:- A valid list of pair having following properties:
- Every pairs must follow this format:
- a valid PawnColour from card
-
No more than three pairs
No null values inside pairs-
first element from entrance and second from card
- Returns:
- a non empty
OptionalValuecontaining a validation error. Or an empty one when the input is correct
-
unsafeApplyEffect
Refer to:CharacterCard.unsafeApplyEffect(CharacterCardInput)for further information- Specified by:
unsafeApplyEffectin classCharacterCard- Parameters:
input- verified user's input- Throws:
Exception- not related to user's input and not recoverable
-