kotcity4 / kotcity.pathfinding / Pathfinder

Pathfinder

class Pathfinder : Debuggable

Constructors

<init>

Pathfinder(cityMap: CityMap)

Properties

cityMap

val cityMap: CityMap

debug

var debug: Boolean

Functions

nearbyRoad

fun nearbyRoad(sourceBlocks: List<BlockCoordinate>, distance: Int = 4): Boolean

path

fun path(start: BlockCoordinate, direction: Direction, maxLength: Int): Path?

pathToNearestJob

fun pathToNearestJob(start: List<BlockCoordinate>, quantity: Int = 1): Path?

pathToNearestLabor

fun pathToNearestLabor(start: List<BlockCoordinate>, quantity: Int = 1): Path?

pathToOutside

fun pathToOutside(start: List<BlockCoordinate>): Path?

purgeCaches

fun purgeCaches(): Unit

tripTo

fun tripTo(source: List<BlockCoordinate>, destinations: List<BlockCoordinate>): Path?

Inherited Functions

debug

open fun debug(message: String): Unit