infinitewisdom.model.grid
Class GridPathFinder

java.lang.Object
  extended by infinitewisdom.model.grid.GridPathFinder

public class GridPathFinder
extends java.lang.Object


Nested Class Summary
static class GridPathFinder.PathFoundException
           
static class GridPathFinder.PathNotExistsException
           
 
Constructor Summary
GridPathFinder(GlobalGrid gg, UnitIF u, Vec2f fromvf, Vec2f tovf, double distance)
           
 
Method Summary
 CustomDataGrid getCDGrid()
           
 double heuristics(Vec2i nextNode, double stepCost)
           
static void moveDown(Vec2i v)
           
static void moveLeft(Vec2i v)
           
static void moveLeftDown(Vec2i v)
           
static void moveLeftUp(Vec2i v)
           
static void moveRight(Vec2i v)
           
static void moveRightDown(Vec2i v)
           
static void moveRightUp(Vec2i v)
           
static void moveUp(Vec2i v)
           
 java.util.List<Vec2i> plan()
           
protected  void pushNewCdNode(Vec2i v, double cost)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GridPathFinder

public GridPathFinder(GlobalGrid gg,
                      UnitIF u,
                      Vec2f fromvf,
                      Vec2f tovf,
                      double distance)
Method Detail

getCDGrid

public CustomDataGrid getCDGrid()

heuristics

public double heuristics(Vec2i nextNode,
                         double stepCost)

plan

public java.util.List<Vec2i> plan()
                           throws GridPathFinder.PathNotExistsException
Throws:
GridPathFinder.PathNotExistsException

pushNewCdNode

protected void pushNewCdNode(Vec2i v,
                             double cost)

moveUp

public static void moveUp(Vec2i v)

moveDown

public static void moveDown(Vec2i v)

moveLeft

public static void moveLeft(Vec2i v)

moveRight

public static void moveRight(Vec2i v)

moveLeftUp

public static void moveLeftUp(Vec2i v)

moveRightUp

public static void moveRightUp(Vec2i v)

moveLeftDown

public static void moveLeftDown(Vec2i v)

moveRightDown

public static void moveRightDown(Vec2i v)