Class RoomGetter

All Implemented Interfaces:

public class RoomGetter extends Object implements RoomGetterInterface
RoomGetter is responsible for getting the state current room.
  • Constructor Details

    • RoomGetter

      public RoomGetter(@NotNull @NotNull GameState state)
      Create a new RoomGetter for a given sate.
      state - the game state that this room getter operates on.
  • Method Details

    • getCurrentRoomLayout

      @NotNull public @NotNull RoomLayout getCurrentRoomLayout()
      Get the current room.

      By definition this only gets the environment of the room.

      Specified by:
      getCurrentRoomLayout in interface RoomGetterInterface
      the current room.
    • getWalkingSprite

      @NotNull public @NotNull String getWalkingSprite()
      Retrieves the WalkingCharacter sprite name String, returns a file name/location corresponding to the name.
      Specified by:
      getWalkingSprite in interface RoomGetterInterface
      a String representing the file name/location for the selected character sprite.
    • isFinalRoom

      public boolean isFinalRoom()
      Checks if the player is in the final room
      Specified by:
      isFinalRoom in interface RoomGetterInterface
      whether the player is in the final room