Class TilePath

java.lang.Object
com.epicbot.api.shared.model.path.Path
com.epicbot.api.shared.model.path.TilePath
Direct Known Subclasses:
ScreenPath

public class TilePath extends Path
Walks a path using the mini-map.
  • Field Details

    • tiles

      protected Tile[] tiles
  • Constructor Details

    • TilePath

      public TilePath(Tile... tiles)
      Construct a new path.
      Parameters:
      tiles - the tiles to walk on
    • TilePath

      public TilePath(double precision, Tile... tiles)
      Construct a new path.
      Parameters:
      precision - how far off the destination this path is considered completed
      tiles - the tiles to walk on
  • Method Details

    • traverse

      public boolean traverse(APIContext ctx)
      Description copied from class: Path
      Takes a step along this path if appropriate.
      Specified by:
      traverse in class Path
      Parameters:
      ctx - APIContext
      Returns:
      true if we are traversing this path, otherwise false. False can mean the destination is already reached or path destination is unreachable.
    • traverse

      public boolean traverse(APIContext ctx, boolean run)
      Description copied from class: Path
      Takes a step along this path if appropriate.
      Specified by:
      traverse in class Path
      Parameters:
      ctx - APIContext
      run - true to enable run
      Returns:
      true if we are traversing this path, otherwise false. False can mean the destination is already reached or path destination is unreachable.
    • validate

      public boolean validate(APIContext ctx)
      Description copied from class: Path
      Checks whether or not this path can be traversed by the player. This will be the case when the player is near to one of its vertices, but not already standing on the end vertex.
      Specified by:
      validate in class Path
      Parameters:
      ctx - APIContext
      Returns:
      true if the player can walk along this path, false otherwise
    • getNext

      public Tile getNext(APIContext ctx)
      Description copied from class: Path
      Gets the next available tile in this path.
      Specified by:
      getNext in class Path
      Parameters:
      ctx - APIContext
      Returns:
      the next tile or null
    • getStart

      public Tile getStart()
      Description copied from class: Path
      Gets the start tile of this path.
      Specified by:
      getStart in class Path
      Returns:
      the start tile
    • getEnd

      public Tile getEnd()
      Description copied from class: Path
      Gets the end tile of this path.
      Specified by:
      getEnd in class Path
      Returns:
      the end tile
    • getTiles

      public Tile[] getTiles()
      Specified by:
      getTiles in class Path
    • walk

      protected boolean walk(APIContext ctx, Tile next)
    • randomize

      public TilePath randomize(int maxX, int maxY)
    • reversed

      public TilePath reversed()