Package megamek.common.pathfinder
Class NewtonianAerospacePathFinder
java.lang.Object
megamek.common.pathfinder.NewtonianAerospacePathFinder
- Direct Known Subclasses:
- AeroSpacePathFinder
This set of classes is intended to be used by AI players to generate paths for infantry units. This includes both
 foot and jump paths.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected List<MoveStepType>protected MovePathprotected Map<CoordsWithFacing,Integer> 
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected booleandiscardPath(MovePath path, CoordsWithFacing pathDestination) Worker function to determine whether we should discard the current path (due to it being illegal or redundant) or keep generating child nodesgenerateStartingPaths(MovePath startingEdge) Generates a list of possible step combinations that should be done at the beginning of a path Has side effect of updating the visited coordinates map and adding it to the list of generated pathsstatic NewtonianAerospacePathFindergetInstance(Game game) protected voidWorker method to put together a pre-defined array of possible movesprotected booleanisIntermediatePath(MovePath path) "Worker" function to determine whether the path being examined is an intermediate path.voidComputes paths to nodes in the graph.
- 
Field Details- 
aerospacePaths
- 
offBoardPath
- 
visitedCoords
- 
moves
 
- 
- 
Constructor Details- 
NewtonianAerospacePathFinder
 
- 
- 
Method Details- 
initializeMoveListprotected void initializeMoveList()Worker method to put together a pre-defined array of possible moves
- 
getAllComputedPathsUncategorized
- 
runComputes paths to nodes in the graph.- Parameters:
- startingEdge- the starting node. Should be empty.
 
- 
getInstance
- 
generateStartingPathsGenerates a list of possible step combinations that should be done at the beginning of a path Has side effect of updating the visited coordinates map and adding it to the list of generated paths- Returns:
- List of all possible "starting" paths
 
- 
isIntermediatePath"Worker" function to determine whether the path being examined is an intermediate path. This means that the path, as is, is not a valid path, but its children may be. This mainly applies to aero paths that have not used all their velocity. For newtonian space flight, it is never an intermediate path.- Parameters:
- path- The move path to consider.
- Returns:
- Whether it is an intermediate path or not.
 
- 
discardPathWorker function to determine whether we should discard the current path (due to it being illegal or redundant) or keep generating child nodes- Parameters:
- path- The move path to consider
- Returns:
- Whether to keep or discard.
 
 
-