path
Class PathFinder

java.lang.Object
  extended by path.PathFinder

public class PathFinder
extends java.lang.Object

A class that provides static methods to return a path from the characters start location to his target location by constructing a list of Walk game actions,

Author:
Frank Bruns

Constructor Summary
PathFinder()
           
 
Method Summary
static void addPath(AbstractCharacterSprite c, SearchGrid grid, double x, double y, com.golden.gamedev.engine.BaseInput bsInput)
          Finds a list of Walk game actions that represents a path from the characters current position to its destionation coordinates and adds it to the specified characters game action queue
static java.util.List<AbstractGameAction> getPath(AbstractCharacterSprite c, java.awt.image.BufferedImage imgWalkableArea, double x, double y)
          Deprecated. do nut use this method any more
static java.util.List<AbstractGameAction> getPath(AbstractCharacterSprite c, SearchGrid grid, double x, double y, com.golden.gamedev.engine.BaseInput bsInput)
          Returns a list of Walk game actions that represents a path from the characters current position to its destionation coordinates
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PathFinder

public PathFinder()
Method Detail

getPath

public static java.util.List<AbstractGameAction> getPath(AbstractCharacterSprite c,
                                                         java.awt.image.BufferedImage imgWalkableArea,
                                                         double x,
                                                         double y)
Deprecated. do nut use this method any more

Returns a list of Walk game actions that represents a path from the characters current position to its destionation coordinates

Parameters:
c - character to find the path for
imgWalkableArea - image that contains the walkable area
x - destination x coordinate
y - destination y coordinate
Returns:
list of Walk events

getPath

public static java.util.List<AbstractGameAction> getPath(AbstractCharacterSprite c,
                                                         SearchGrid grid,
                                                         double x,
                                                         double y,
                                                         com.golden.gamedev.engine.BaseInput bsInput)
Returns a list of Walk game actions that represents a path from the characters current position to its destionation coordinates

Parameters:
c - character to find the path for
grid - the search grid to calculate the path in
x - destination x coordinate
y - destination y coordinate
Returns:
list of Walk events

addPath

public static void addPath(AbstractCharacterSprite c,
                           SearchGrid grid,
                           double x,
                           double y,
                           com.golden.gamedev.engine.BaseInput bsInput)
Finds a list of Walk game actions that represents a path from the characters current position to its destionation coordinates and adds it to the specified characters game action queue

Parameters:
c - character to find the path for
grid - the search grid to calculate the path in
x - destination x coordinate
y - destination y coordinate
bsInput -