Fixed "Trade is no longer valid" problem

This commit is contained in:
Yair Morgenstern 2020-04-11 22:26:12 +03:00
parent d092e9b6a9
commit cc1ae034d3

View File

@ -25,7 +25,7 @@ class TradeEvaluation{
fun hasResource(tradeOffer: TradeOffer): Boolean {
val resourcesByName = offerer.getCivResourcesByName()
return resourcesByName.containsKey(tradeOffer.name) && resourcesByName[tradeOffer.name]!! >= tradeOffer.amount
return resourcesByName.containsKey(tradeOffer.name) && resourcesByName[tradeOffer.name]!! >= 0
}
when(tradeOffer.type){