Package com.mg105.use_cases.map
Class RoomGetter
java.lang.Object
com.mg105.use_cases.map.RoomGetter
- All Implemented Interfaces:
RoomGetterInterface
RoomGetter is responsible for getting the state current room.
-
Constructor Summary
ConstructorDescriptionRoomGetter
(@NotNull GameState state) Create a new RoomGetter for a given sate. -
Method Summary
Modifier and TypeMethodDescription@NotNull RoomLayout
Get the current room.@NotNull String
Retrieves the WalkingCharacter sprite name String, returns a file name/location corresponding to the name.boolean
Checks if the player is in the final room
-
Constructor Details
-
RoomGetter
Create a new RoomGetter for a given sate.- Parameters:
state
- the game state that this room getter operates on.
-
-
Method Details
-
getCurrentRoomLayout
Get the current room.By definition this only gets the environment of the room.
- Specified by:
getCurrentRoomLayout
in interfaceRoomGetterInterface
- Returns:
- the current room.
-
getWalkingSprite
Retrieves the WalkingCharacter sprite name String, returns a file name/location corresponding to the name.- Specified by:
getWalkingSprite
in interfaceRoomGetterInterface
- Returns:
- 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 interfaceRoomGetterInterface
- Returns:
- whether the player is in the final room
-