public bool CanSell(T type, TradingInventoryAdapter <T> selfInventory, TradingInventoryAdapter <T> marketInventory)
 {
     return(selfInventory.Get(type) > 0 &&
            marketInventory.Get(moneyType) > 0 &&
            marketInventory.CanFitMoreOf(type));
 }
Beispiel #2
0
 private bool CanExchangeInto(T type, TradingInventoryAdapter <T> targetInventory, TradingInventoryAdapter <T> sourceInventory)
 {
     return(sourceInventory.Get(type) > 0 &&
            targetInventory.Get(moneyType) > 0 &&
            targetInventory.CanFitMoreOf(type));
 }