Rogue: Savage Rats, a retro-themed dungeon crawler
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
rogue-savage-rats/src/mightypork/gamecore/util/math/algo/pathfinding/PathFinderProxy.java

61 行
921 B

package mightypork.gamecore.util.math.algo.pathfinding;
import java.util.List;
import mightypork.gamecore.util.math.algo.Coord;
import mightypork.gamecore.util.math.algo.Move;
/**
* Pathfinder proxy. Can be used to override individual methods but keep the
* rest as is.
*
* @author MightyPork
*/
public class PathFinderProxy extends PathFinder {
private final PathFinder source;
public PathFinderProxy(PathFinder other)
{
this.source = other;
}
@Override
public boolean isAccessible(Coord pos)
{
return source.isAccessible(pos);
}
@Override
public int getCost(Coord from, Coord to)
{
return source.getCost(from, to);
}
@Override
public int getMinCost()
{
return source.getMinCost();
}
@Override
protected Heuristic getHeuristic()
{
return source.getHeuristic();
}
@Override
protected List<Move> getWalkSides()
{
return source.getWalkSides();
}
}