Interface IPathRanker

All Known Implementing Classes:
AerospacePathRanker, BasicPathRanker, InfantryPathRanker, MutualSupportPathRanker, NewtonianAerospacePathRanker, PathRanker, UtilityPathRanker

public interface IPathRanker
  • Method Details

    • rankPaths

      TreeSet<RankedPath> rankPaths(List<MovePath> movePaths, Game game, int maxRange, double fallTolerance, List<Entity> enemies, List<Entity> friends)
    • initUnitTurn

      void initUnitTurn(Entity unit, Game game)
      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

      double distanceToClosestEnemy(Entity entity, Coords position, Game game)
    • distanceToHomeEdge

      int distanceToHomeEdge(Coords position, int boardId, CardinalEdge homeEdge, Game game)
      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 look
      homeEdge - Unit's home edge.
      game - The current Game
      Returns:
      The distance, in hexes to the unit's home edge.
    • getBestPath

      RankedPath getBestPath(TreeSet<RankedPath> ps)
      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

      Targetable findClosestEnemy(Entity me, Coords position, Game game)
      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