kotcity4 / kotcity.data / Inventory

Inventory

class Inventory

Constructors

<init>

Inventory()

Functions

add

fun add(tradeable: Tradeable, quantity: Int): Int

forEach

fun forEach(action: (Tradeable, Int) -> Unit): Unit

has

fun has(tradeable: Tradeable, quantity: Int): Boolean

put

fun put(tradeable: Tradeable, quantity: Int): Int

quantity

fun quantity(tradeable: Tradeable): Int

subtract

fun subtract(tradeable: Tradeable, quantity: Int): Int