Class SimplePathfinder

java.lang.Object
games.stendhal.server.core.pathfinder.Pathfinder
games.stendhal.server.core.pathfinder.SimplePathfinder

public class SimplePathfinder extends Pathfinder
A simple and stupid path finder that checks just the collision map, but does not require adding an entity to the map before using.
  • Constructor Details

    • SimplePathfinder

      public SimplePathfinder(StendhalRPZone zone, int startX, int startY, Rectangle2D destination, double maxDist)
      Create a new SimplePathfinder.
      Parameters:
      zone - The zone used for path finding
      startX - Starting point x coordinate
      startY - Starting point y coordinate
      destination - destination area
      maxDist - maximum search distance
  • Method Details

    • createNode

      public Pathfinder.TreeNode createNode(int x, int y)
      Description copied from class: Pathfinder
      Create a new TreeNode
      Specified by:
      createNode in class Pathfinder
      Parameters:
      x - x coordinate of the node
      y - y coordinate of the node
      Returns:
      TreeNode