Class MoveDestination

java.lang.Object
it.polimi.ingsw.Controller.MoveDestination
All Implemented Interfaces:
Serializable

public class MoveDestination extends Object implements Serializable
This class is used by MoveStudent to direct a pawn from the entrance to the correct destination
See Also:
  • Field Details

  • 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

      public static MoveDestination toDiningRoom()
      call this method if you wish to point to the dining room
      Returns:
      a new object pointing to the dining room
    • toIsland

      public static MoveDestination toIsland(int islandID)
      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

      public DestinationType getDestinationType()
      Returns:
      the DestinationType selected during creation of the object
    • getIslandID

      public Integer getIslandID()
      Returns:
      the ID of the island this class is pointing to, or null if the DestinationType is DestinationType.DININGROOM