Package it.polimi.ingsw.Controller
Class MoveDestination
java.lang.Object
it.polimi.ingsw.Controller.MoveDestination
- All Implemented Interfaces:
Serializable
This class is used by
MoveStudent
to direct a pawn from the entrance to the correct destination- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprivate final DestinationType
private final OptionalValue<Integer>
private static final long
-
Constructor Summary
ModifierConstructorDescriptionprivate
Constructor used to point to the dining roomprivate
MoveDestination
(int islandID) Constructor used to point to an island -
Method Summary
Modifier and TypeMethodDescriptionstatic MoveDestination
call this method if you wish to point to the dining roomstatic MoveDestination
toIsland
(int islandID) call this method if you wish to point to an island
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
destinationType
-
islandID
-
-
Constructor Details
-
MoveDestination
private MoveDestination(int islandID) Constructor used to point to an island- Parameters:
islandID
- the id of the island to point to
-
MoveDestination
private MoveDestination()Constructor used to point to the dining room
-
-
Method Details
-
toDiningRoom
call this method if you wish to point to the dining room- Returns:
- a new object pointing to the dining room
-
toIsland
call this method if you wish to point to an island- Parameters:
islandID
- the id of the island to point to- Returns:
- a new object pointing to the desired island id
-
getDestinationType
- Returns:
- the
DestinationType
selected during creation of the object
-
getIslandID
- Returns:
- the ID of the island this class is pointing to, or null if the
DestinationType
isDestinationType.DININGROOM
-