Package megamek.client.bot.princess
Interface IPathRanker
- All Known Implementing Classes:
AerospacePathRanker,BasicPathRanker,InfantryPathRanker,MutualSupportPathRanker,NewtonianAerospacePathRanker,PathRanker,UtilityPathRanker
public interface IPathRanker
-
Method Summary
Modifier and TypeMethodDescriptiondoubledistanceToClosestEnemy(Entity entity, Coords position, Game game) intdistanceToHomeEdge(Coords position, int boardId, CardinalEdge homeEdge, Game game) Returns distance to the unit's home edge.findClosestEnemy(Entity me, Coords position, Game game) Find the closest enemy to a unit with a pathdefault TargetablefindClosestEnemy(Entity me, Coords position, Game game, boolean includeStrategicTargets) Find the closest enemy to a unit with a pathfindClosestEnemy(Entity me, Coords position, Game game, boolean includeStrategicTargets, int minRange) Find the closest enemy to a unit with a pathgetBestPath(TreeSet<RankedPath> ps) Returns the best path of a list of ranked paths.voidinitUnitTurn(Entity unit, Game game) Performs initialization to help speed later calls of rankPath for this unit on this turn.rankPaths(List<MovePath> movePaths, Game game, int maxRange, double fallTolerance, List<Entity> enemies, List<Entity> friends)
-
Method Details
-
rankPaths
-
initUnitTurn
Performs initialization to help speed later calls of rankPath for this unit on this turn. Rankers that extend this class should override this function -
distanceToClosestEnemy
-
distanceToHomeEdge
Returns distance to the unit's home edge. Gives the distance to the closest edge- Parameters:
position- Final coordinates of the proposed move.boardId- The board on which to lookhomeEdge- Unit's home edge.game- The currentGame- Returns:
- The distance, in hexes to the unit's home edge.
-
getBestPath
Returns the best path of a list of ranked paths.- Parameters:
ps- The list of ranked paths to process- Returns:
- "Best" out of those paths
-
findClosestEnemy
Find the closest enemy to a unit with a path -
findClosestEnemy
default Targetable findClosestEnemy(Entity me, Coords position, Game game, boolean includeStrategicTargets) Find the closest enemy to a unit with a path -
findClosestEnemy
Targetable findClosestEnemy(Entity me, Coords position, Game game, boolean includeStrategicTargets, int minRange) Find the closest enemy to a unit with a path
-