Package rsb.wrappers

Class RSPath

Direct Known Subclasses:
RSLocalPath, RSTilePath

public abstract class RSPath extends MethodProvider
Represents a path to walk along in game.
Author:
GigiaJ
  • Constructor Details

  • Method Details

    • traverse

      public abstract boolean traverse(EnumSet<RSPath.TraversalOption> options)
      Takes a step along this path if appropriate. If the path cannot be traversed due to the player being too far from its vertices or already at the end vertex, false will be returned. In all other cases, true will be returned, but an action will not necessarily be performed (based on the given options).
      Parameters:
      options - Walking style options.
      Returns:
      true if this path is currently valid for the player; otherwise false.
    • traverse

      public boolean traverse()
      Takes a step along this path if appropriate. Specifies only TraversalOption.SPACE_ACTIONS.
      Returns:
      true if this path is currently valid for the player; otherwise false.
      See Also:
    • isValid

      public abstract boolean isValid()
      Checks whether this path can be traversed by the player. This will be the case provided that the player near to one of its vertices, but not already standing on the end vertex.
      Returns:
      true if the player can walk along this path; otherwise false.
    • getNext

      public abstract RSTile getNext()
      Gets the next immediately available vertex in this path.
      Returns:
      The next walkable RSTile.
    • getStart

      public abstract RSTile getStart()
      Gets the start tile of this path.
      Returns:
      The start RSTile.
    • getEnd

      public abstract RSTile getEnd()
      Gets the end tile of this path.
      Returns:
      The end RSTile.