Package it.polimi.ingsw.Model
Class Card01
java.lang.Object
it.polimi.ingsw.Model.CharacterCard
it.polimi.ingsw.Model.StatefulEffect
it.polimi.ingsw.Model.Card01
- All Implemented Interfaces:
Serializable
Character Card#1
In setup, draw 4 Students and place them on this card.
EFFECT: Take 1 Student from this card and place it on an Island of your choice. Then, draw a new Student from the Bag and place it on this card.
EFFECT: Take 1 Student from this card and place it on an Island of your choice. Then, draw a new Student from the Bag and place it on this card.
- 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 card's contentGet card's stateTypeRefer 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
-
Card01
-
-
Method Details
-
getState
Get card's content- Specified by:
getStatein classStatefulEffect- Returns:
- List of Objects with pawns (Can be cast to
PawnColour)
-
getStateType
Get card's stateType- Specified by:
getStateTypein classStatefulEffect- Returns:
- card's stateType
-
overridableCheckInput
Refer to:CharacterCard.overridableCheckInput(CharacterCardInput)for further information- Specified by:
overridableCheckInputin classCharacterCard- Parameters:
input- CharacterCardInput should contain:- A valid island's ID
- a valid PawnColour 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
-