kotcity4 / kotcity.automata / ResourceFinder

ResourceFinder

class ResourceFinder : Debuggable

Constructors

<init>

ResourceFinder(cityMap: CityMap)

Properties

cityMap

val cityMap: CityMap

debug

var debug: Boolean

Functions

findSource

fun findSource(sourceBlocks: List<BlockCoordinate>, tradeable: Tradeable, quantity: Int): Pair<TradeEntity, Path>?

nearestBuyingTradeable

fun nearestBuyingTradeable(tradeable: Tradeable, sourceBlocks: List<BlockCoordinate>, maxDistance: Int = MAX_RESOURCE_DISTANCE): Pair<TradeEntity, Path>?

quantityForSaleNearby

fun quantityForSaleNearby(tradeable: Tradeable, sourceBlock: BlockCoordinate, maxDistance: Int = MAX_RESOURCE_DISTANCE): Int

quantityWantedNearby

fun quantityWantedNearby(tradeable: Tradeable, sourceBlock: BlockCoordinate, maxDistance: Int = MAX_RESOURCE_DISTANCE): Int

Inherited Functions

debug

open fun debug(message: String): Unit