Parameters
- start: RoomPosition[]
- options: {
allOfDestinations?: RoomPosition[];
anyOfDestinations?: RoomPosition[];
costMatrixCallback: (room: string) => undefined | ClockworkCostMatrix;
maxRoomDistance?: number;
maxRooms?: number;
maxTileDistance?: number;
maxTiles?: number;
}
Returns ClockworkMultiroomDistanceMap
A multi-room distance map.
Create a distance map for the given start positions, using Dijkstra's algorithm to factor in terrain costs (0-255, where 255 is impassable).
This calculates a distance map across multiple rooms, with a few configurable limits:
maxTiles
: The maximum number of tiles to explore.maxRooms
: The maximum number of rooms to explore.maxRoomDistance
: Don't explore rooms further (in Manhattan distance) than this.maxTileDistance
: Don't explore tiles further (in accumulated cost) than this.At least one of these limits must be set.