Adventure at Umalu  22nd March, 2013
Rogue-like Dungeon Crawler, written in Java
 All Classes Functions Variables Pages
Public Member Functions | Protected Member Functions | List of all members
jade.path.PathFinder Class Referenceabstract
Inheritance diagram for jade.path.PathFinder:
jade.path.AStar jade.path.Bresenham

Public Member Functions

final List< CoordinategetPartialPath (World world, Coordinate start, Coordinate end)
 
final List< CoordinategetPartialPath (World world, int posX, int posY, int endX, int endY)
 
final List< CoordinategetPath (World world, Coordinate start, Coordinate end)
 
final List< CoordinategetPath (World world, int posX, int posY, int endX, int endY)
 

Protected Member Functions

abstract List< CoordinatecalcPath (World world, Coordinate start, Coordinate end)
 

Detailed Description

Represents an algorithm for calculating paths on a

World

. These paths can be either partial, meaning the path may not actually reach its goal, or complete, meaning it is either

null

or reaches its goal.

Member Function Documentation

abstract List<Coordinate> jade.path.PathFinder.calcPath ( World  world,
Coordinate  start,
Coordinate  end 
)
protectedpure virtual

Calculates and returns the partial path from the given start to end on the provided

World

. Since the path is incomplete, it may or may not terminate at the provided end. Null should never be returned from this method. If a path cannot be found, a partial path, or at least an empty path should be returned.

Parameters
worldthe world on which the path is calculated
startthe start of the calculated path
endthe intended end of the calculated path
Returns
a path from start to end on world

Implemented in jade.path.AStar, and jade.path.Bresenham.

final List<Coordinate> jade.path.PathFinder.getPartialPath ( World  world,
Coordinate  start,
Coordinate  end 
)

Returns a partial path from the given start to end on the provided

World

. Since the path is incomplete, it may or may not terminate at the provided end.

Parameters
worldthe world on which the path is calculated
startthe start of the calculated path
endthe intended end of the calculated path
Returns
a path from start to end on world
final List<Coordinate> jade.path.PathFinder.getPartialPath ( World  world,
int  posX,
int  posY,
int  endX,
int  endY 
)

Returns a partial path from the given start to end on the provided

World

. Since the path is incomplete, it may or may not terminate at the provided end.

Parameters
worldthe world on which the path is calculated
posXthe x value of the start
posYthe y value of the start
endXthe x value of the end
endYthe y value of the end
Returns
a path from start to end on world
final List<Coordinate> jade.path.PathFinder.getPath ( World  world,
Coordinate  start,
Coordinate  end 
)

Returns a partial path from the given start to end on the provided

World

. Since the path is complete, it will either be null, or terminate at the given end.

Parameters
worldthe world on which the path is calculated
startthe start of the calculated path
endthe intended end of the calculated path
Returns
a path from start to end on world
final List<Coordinate> jade.path.PathFinder.getPath ( World  world,
int  posX,
int  posY,
int  endX,
int  endY 
)

Returns a complete path from the given start to end on the provided

World

. Since the path is complete, it will either be null, or terminate at the given end.

Parameters
worldthe world on which the path is calculated
posXthe x value of the start
posYthe y value of the start
endXthe x value of the end
endYthe y value of the end
Returns
a path from start to end on world

The documentation for this class was generated from the following file: