Class CharacterMover

All Implemented Interfaces:

public class CharacterMover extends Object implements CharacterMoverInterface
Move the player within a room.
  • Constructor Details

    • CharacterMover

      public CharacterMover(@NotNull @NotNull GameState state, @NotNull @NotNull RoomUpdaterInterface updater)
      Create a CharacterMover to operate on state and to update the room visuals via the updater
      state - the current game state.
      updater - something that will update the visual representation of the room on change.
  • Method Details

    • generateMapMoveBy

      public void generateMapMoveBy(Point direction)
      Attempt to move by direction. Taking to account walls, chests, battles, exits, etc.
      Specified by:
      generateMapMoveBy in interface CharacterMoverInterface
      direction - the direction to move. The direction must have a magnitude of 1 and be in exactly one cardinal direction.