Package com.mg105.interface_adapters.map
Class MinimapInterpreter
java.lang.Object
com.mg105.interface_adapters.map.MinimapInterpreter
- All Implemented Interfaces:
MinimapInterpreterInterface,Resetable,PropertyChangeListener,EventListener
public class MinimapInterpreter
extends Object
implements PropertyChangeListener, Resetable, MinimapInterpreterInterface
The MinimapInterpreter processes room change data an interprets its implicit position.
-
Constructor Summary
ConstructorsConstructorDescriptionMinimapInterpreter(@NotNull RoomGetterInterface getter) Create a new MinimapInterpreter. -
Method Summary
Modifier and TypeMethodDescription@NotNull PointGet the current position in (x, y)-coordinates of the result of getMapSoFar.@NotNull MinimapRoomState[][]Get the current explored map.voidUpdate room position data.voidreset()Reset the minimap to its 'factory new' state.
-
Constructor Details
-
MinimapInterpreter
Create a new MinimapInterpreter.- Parameters:
getter- the RoomGetter that will get room information.
-
-
Method Details
-
reset
public void reset()Reset the minimap to its 'factory new' state. -
propertyChange
Update room position data.- Specified by:
propertyChangein interfacePropertyChangeListener- Parameters:
evt- A PropertyChangeEvent object describing the event source and the property that has changed.
-
getMapSoFar
Get the current explored map.- Specified by:
getMapSoFarin interfaceMinimapInterpreterInterface- Returns:
- the currently explored map.
- See Also:
-
getCurrentPosition
Get the current position in (x, y)-coordinates of the result of getMapSoFar.- Specified by:
getCurrentPositionin interfaceMinimapInterpreterInterface- Returns:
- the current room you are in.
- See Also:
-