Class Doorway

java.lang.Object
com.mg105.entities.Doorway

public class Doorway extends Object
A Doorway represents a single-direction connection from one room to another.
  • Constructor Details

    • Doorway

      public Doorway(@NotNull @NotNull Point position, @NotNull @NotNull Room nextRoom)
      Create a doorway with its position in the room and the next room.
      Parameters:
      position - the in-room position of this doorway.
      nextRoom - the room that should be travelled to if this doorway is entered.
  • Method Details

    • getPosition

      @NotNull public @NotNull Point getPosition()
      Gets the position of the doorway.
      Returns:
      the position of the doorway.
    • getNextRoom

      @NotNull public @NotNull Room getNextRoom()
      Gets the next room.
      Returns:
      the next room.