org.newdawn.slick.util.pathfinding
Interface PathFinder

All Known Implementing Classes:
AStarPathFinder

public interface PathFinder

A description of an implementation that can find a path from one location on a tile map to another based on information provided by that tile map.

Author:
Kevin Glass
See Also:
TileBasedMap

Method Summary
 Path findPath(Mover mover, int sx, int sy, int tx, int ty)
          Find a path from the starting location provided (sx,sy) to the target location (tx,ty) avoiding blockages and attempting to honour costs provided by the tile map.
 

Method Detail

findPath

Path findPath(Mover mover,
              int sx,
              int sy,
              int tx,
              int ty)
Find a path from the starting location provided (sx,sy) to the target location (tx,ty) avoiding blockages and attempting to honour costs provided by the tile map.

Parameters:
mover - The entity that will be moving along the path. This provides a place to pass context information about the game entity doing the moving, e.g. can it fly? can it swim etc.
sx - The x coordinate of the start location
sy - The y coordinate of the start location
tx - The x coordinate of the target location
ty - Teh y coordinate of the target location
Returns:
The path found from start to end, or null if no path can be found.


Copyright © 2006 New Dawn Software. All Rights Reserved.