/**
 * Contains powerful methods for pathfinding in the game world. Support exists for custom navigation costs and paths which span multiple rooms.
 * Additionally PathFinder can search for paths through rooms you can't see, although you won't be able to detect any dynamic obstacles like creeps or buildings.
 */ interface PathFinder { /**
     * Container for custom navigation cost data.
     */ CostMatrix : CostMatrix ; param origin param goal param opts search ( origin , goal , opts ? ) : PathFinderPath ; param origin param goal param opts search ( origin , goal , opts ? ) : PathFinderPath ; param isEnabled use ( isEnabled ) : void ; } /**
 * An object containing:
 * path - An array of RoomPosition objects.
 * ops - Total number of operations performed before this path was calculated.
 * cost - The total cost of the path as derived from `plainCost`, `swampCost` and any given CostMatrix instances.
 * incomplete - If the pathfinder fails to find a complete path, this will be true.
 *   Note that `path` will still be populated with a partial path which represents the closest path it could find given the search parameters.
 */ interface PathFinderPath { path : RoomPosition [ ] ; ops : number ; cost : number ; incomplete : boolean ; } /**
 * An object containing additional pathfinding flags.
 */ interface PathFinderOpts { /**
     * Cost for walking on plain positions. The default is 1.
     */ plainCost ? : number ; /**
     * Cost for walking on swamp positions. The default is 5.
     */ swampCost ? : number ; /**
     * Instead of searching for a path to the goals this will search for a path away from the goals.
     * The cheapest path that is out of range of every goal will be returned. The default is false.
     */ flee ? : boolean ; /**
     * The maximum allowed pathfinding operations. You can limit CPU time used for the search based on ratio 1 op ~ 0.001 CPU. The default value is 2000.
     */ maxOps ? : number ; /**
     * The maximum allowed rooms to search. The default (and maximum) is 16.
     */ maxRooms ? : number ; /**
     * Weight to apply to the heuristic in the A* formula F = G + weight * H. Use this option only if you understand
     * the underlying A* algorithm mechanics! The default value is 1.
     */ heuristicWeight ? : number ; param roomName roomCallback ? ( roomName ) : boolean | CostMatrix ; } /**
 * Container for custom navigation cost data.
 */ interface CostMatrix { constructor new ( ) : CostMatrix ; param x param y param cost set ( x , y , cost ) : void ; param x param y get ( x , y ) : number ; /**
     * Copy this CostMatrix into a new CostMatrix with the same data.
     */ clone ( ) : CostMatrix ; /**
     * Returns a compact representation of this CostMatrix which can be stored via JSON.stringify.
     */ serialize ( ) : number [ ] ; param val deserialize ( val ) : CostMatrix ; }