kotcity4 / kotcity.data / HasConcreteContacts

HasConcreteContacts

interface HasConcreteContacts : HasContracts

Properties

cityMap

abstract val cityMap: CityMap

consumes

abstract val consumes: MutableMap<Tradeable, Int>

contracts

abstract val contracts: MutableList<Contract>

produces

abstract val produces: MutableMap<Tradeable, Int>

Functions

addContract

open fun addContract(contract: Contract): Unit

consumesQuantity

open fun consumesQuantity(tradeable: Tradeable): Int

currentQuantityForSale

open fun currentQuantityForSale(tradeable: Tradeable): Int

currentQuantityWanted

open fun currentQuantityWanted(tradeable: Tradeable): Int

hasAnyContracts

open fun hasAnyContracts(): Boolean

producesQuantity

open fun producesQuantity(tradeable: Tradeable): Int

productList

open fun productList(): List<Tradeable>

summarizeContracts

open fun summarizeContracts(): String

totalBeingBought

open fun totalBeingBought(tradeable: Tradeable): Int

totalBeingSold

open fun totalBeingSold(tradeable: Tradeable): Int

voidContractsWith

open fun voidContractsWith(otherEntity: TradeEntity): Unit

voidRandomContract

open fun voidRandomContract(): Unit

Inherited Functions

needsAnyContracts

open fun needsAnyContracts(): Boolean

Inheritors

Building

abstract class Building : HasConcreteInventory, HasConcreteContacts

The basic unit of simulation in this game. Represents a building and all its attributes. We currently count Road as building as well as PowerLine.