Class SimplePathfinder
java.lang.Object
games.stendhal.server.core.pathfinder.Pathfinder
games.stendhal.server.core.pathfinder.SimplePathfinder
A simple and stupid path finder that checks just the collision map,
but does not require adding an entity to the map before using.
-
Nested Class Summary
Nested classes/interfaces inherited from class games.stendhal.server.core.pathfinder.Pathfinder
Pathfinder.TreeNode -
Field Summary
Fields inherited from class games.stendhal.server.core.pathfinder.Pathfinder
goalNode, IN_PROGRESS, PATH_FOUND, PATH_NOT_FOUND, startNode, STRAIGHT_PATH_PREFERENCE_FACTOR -
Constructor Summary
ConstructorsConstructorDescriptionSimplePathfinder(StendhalRPZone zone, int startX, int startY, Rectangle2D destination, double maxDist) Create a newSimplePathfinder. -
Method Summary
Methods inherited from class games.stendhal.server.core.pathfinder.Pathfinder
getPath, getStatus, init, unreachableGoal
-
Constructor Details
-
SimplePathfinder
public SimplePathfinder(StendhalRPZone zone, int startX, int startY, Rectangle2D destination, double maxDist) Create a newSimplePathfinder.- Parameters:
zone- The zone used for path findingstartX- Starting point x coordinatestartY- Starting point y coordinatedestination- destination areamaxDist- maximum search distance
-
-
Method Details
-
createNode
Description copied from class:PathfinderCreate a new TreeNode- Specified by:
createNodein classPathfinder- Parameters:
x- x coordinate of the nodey- y coordinate of the node- Returns:
- TreeNode
-