kotcity4 / kotcity.data / HasConcreteInventory / transferInventory

transferInventory

open fun transferInventory(to: TradeEntity, tradeable: Tradeable, quantity: Int): Int

Overrides HasInventory.transferInventory

Send Tradeable to another TradeEntity but only if we actually have it

Parameters

to - other TradeEntity to send to

tradeable - which Tradeable to transact in

quantity - how many Tradeable to send

TODO
implement partial fulfillment...

Return
how many Tradeable were actually sent to to