interface HasConcreteInventory : HasInventory
This is used for something in the CityMap that has REAL trackable inventory. The reason we have "HasConcreteInventory" and not is because the outside NationalTradeEntity does not REALLY have anything. It just pretends to.
abstract val inventory: Inventory |
open fun addInventory(tradeable: Tradeable, quantity: Int): Int |
|
open fun balance(): Int
How much Tradeable.MONEY that the given thing has. |
|
open fun quantityOnHand(tradeable: Tradeable): Int |
|
open fun setInventory(tradeable: Tradeable, quantity: Int): Int |
|
open fun subtractInventory(tradeable: Tradeable, quantity: Int): Int |
|
open fun summarizeInventory(): String
Used to print a textual description of the Tradeables that this thing has. |
|
open fun transferInventory(to: TradeEntity, tradeable: Tradeable, quantity: Int): Int
Send Tradeable to another TradeEntity but only if we actually have it |
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. |