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
Modifier and TypeFieldDescriptionprivate final PlayerBoard
private static final long
private Island
private PawnColour
private List<Pair<PawnColour,
PawnColour>> -
Constructor Summary
ConstructorDescriptionCharacterCardInput
(PlayerBoard caller) Constructor for the base input of the card. -
Method Summary
Modifier and TypeMethodDescriptionvoid
setTargetIsland
(Island targetIsland) void
setTargetPawn
(PawnColour targetPawn) void
setTargetPawnPairs
(List<Pair<PawnColour, PawnColour>> targetPawnPairs) Note: the convention of thePair
is 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'sPlayerBoard
as an input.
-
-
Method Details
-
getCaller
- Returns:
- the caller's
PlayerBoard
-
getTargetIsland
- Returns:
- the
Island
set as a target. The value is wrapped in aOptionalValue
, as the related input is not compulsory
-
setTargetIsland
- Parameters:
targetIsland
- theIsland
to set as a target
-
getTargetPawn
- Returns:
- the
PawnColour
set as a target. The value is wrapped in aOptionalValue
, as the related input is not compulsory
-
setTargetPawn
- Parameters:
targetPawn
- thePawnColour
to set as a target
-
getTargetPawnPairs
- Returns:
- the the
List
ofPair
s ofPawnColour
set as a target. The value is wrapped in aOptionalValue
, as the related input is not compulsory
-
setTargetPawnPairs
Note: the convention of thePair
is to be verified through the card that requires the input.- Parameters:
targetPawnPairs
- theList
ofPair
s ofPawnColour
to set as a target.
-