Rogue: Savage Rats, a retro-themed dungeon crawler
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
rogue-savage-rats/src/mightypork/rogue/world/pathfinding/PathFindingContext.java

36 lines
591 B

package mightypork.rogue.world.pathfinding;
import mightypork.rogue.world.Coord;
public interface PathFindingContext {
/**
* @param pos tile pos
* @return true if the tile is walkable
*/
boolean isAccessible(Coord pos);
/**
* Cost of walking onto a tile. It's useful to use ie. 10 for basic step.
*
* @param from last tile
* @param to current tile
* @return cost
*/
int getCost(Coord from, Coord to);
/**
* @return lowest cost. Used to multiply heuristics.
*/
int getMinCost();
/**
* @return used heuristic
*/
Heuristic getHeuristic();
}