Package it.polimi.ingsw.Model
Class CharacterCardInput
java.lang.Object
it.polimi.ingsw.Model.CharacterCardInput
- All Implemented Interfaces:
Serializable
Each
CharacterCard can use many input parameters. This class serves as a way to group all possible inputs and
edit them in a safe, coherent way.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final PlayerBoardprivate static final longprivate Islandprivate PawnColourprivate List<Pair<PawnColour,PawnColour>> -
Constructor Summary
ConstructorsConstructorDescriptionCharacterCardInput(PlayerBoard caller) Constructor for the base input of the card. -
Method Summary
Modifier and TypeMethodDescriptionvoidsetTargetIsland(Island targetIsland) voidsetTargetPawn(PawnColour targetPawn) voidsetTargetPawnPairs(List<Pair<PawnColour, PawnColour>> targetPawnPairs) Note: the convention of thePairis to be verified through the card that requires the input.
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
caller
-
targetIsland
-
targetPawn
-
targetPawnPairs
-
-
Constructor Details
-
CharacterCardInput
Constructor for the base input of the card.- Parameters:
caller- each card requires the caller'sPlayerBoardas an input.
-
-
Method Details
-
getCaller
- Returns:
- the caller's
PlayerBoard
-
getTargetIsland
- Returns:
- the
Islandset as a target. The value is wrapped in aOptionalValue, as the related input is not compulsory
-
setTargetIsland
- Parameters:
targetIsland- theIslandto set as a target
-
getTargetPawn
- Returns:
- the
PawnColourset as a target. The value is wrapped in aOptionalValue, as the related input is not compulsory
-
setTargetPawn
- Parameters:
targetPawn- thePawnColourto set as a target
-
getTargetPawnPairs
- Returns:
- the the
ListofPairs ofPawnColourset as a target. The value is wrapped in aOptionalValue, as the related input is not compulsory
-
setTargetPawnPairs
Note: the convention of thePairis to be verified through the card that requires the input.- Parameters:
targetPawnPairs- theListofPairs ofPawnColourto set as a target.
-