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
FieldsModifier and TypeFieldDescriptionprivate final DestinationTypeprivate final OptionalValue<Integer>private static final long -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateConstructor used to point to the dining roomprivateMoveDestination(int islandID) Constructor used to point to an island -
Method Summary
Modifier and TypeMethodDescriptionstatic MoveDestinationcall this method if you wish to point to the dining roomstatic MoveDestinationtoIsland(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
DestinationTypeselected during creation of the object
-
getIslandID
- Returns:
- the ID of the island this class is pointing to, or null if the
DestinationTypeisDestinationType.DININGROOM
-