This commit is contained in:
Yair Morgenstern
2023-03-26 21:55:23 +03:00
parent 3047335db1
commit 837833e450
38 changed files with 185 additions and 66 deletions

View File

@ -82,7 +82,7 @@ class TradeEvaluation {
when (offer.type) {
TradeType.Gold -> return offer.amount
// GPT loses 1% of value for each 'future' turn, meaning: gold now is more valuable than gold in the future
TradeType.Gold_Per_Turn -> return (1..offer.duration).sumOf { (offer.amount * 0.99.pow(it)) }.toInt()
TradeType.Gold_Per_Turn -> return (1..offer.duration).sumOf { offer.amount * 0.99.pow(it) }.toInt()
TradeType.Treaty -> {
return when (offer.name) {
// Since it will be evaluated twice, once when they evaluate our offer and once when they evaluate theirs