diff options
Diffstat (limited to 'sw-engine/src')
-rw-r--r-- | sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/cards/Requirements.kt | 3 | ||||
-rw-r--r-- | sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/cards/RequirementsSatisfaction.kt | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/cards/Requirements.kt b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/cards/Requirements.kt index 4872f44f..5966ced5 100644 --- a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/cards/Requirements.kt +++ b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/cards/Requirements.kt @@ -6,7 +6,6 @@ import org.luxons.sevenwonders.engine.boards.Board import org.luxons.sevenwonders.engine.resources.* import org.luxons.sevenwonders.model.resources.ResourceTransactions import org.luxons.sevenwonders.model.resources.bestPrice -import org.luxons.sevenwonders.model.resources.noTransactionOptions import org.luxons.sevenwonders.model.resources.totalPrice @Serializable @@ -44,7 +43,7 @@ data class Requirements internal constructor( } val minPrice = allOptions.bestPrice + gold if (minPrice > player.board.gold) { - return RequirementsSatisfaction.missingGoldForResources(minPrice, noTransactionOptions()) + return RequirementsSatisfaction.missingGoldForResources(minPrice) } val availableOptions = allOptions.filter { it.totalPrice + gold <= player.board.gold } return RequirementsSatisfaction.metWithHelp(minPrice, availableOptions) diff --git a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/cards/RequirementsSatisfaction.kt b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/cards/RequirementsSatisfaction.kt index 55ec1edb..5f5db0db 100644 --- a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/cards/RequirementsSatisfaction.kt +++ b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/cards/RequirementsSatisfaction.kt @@ -31,8 +31,8 @@ internal data class RequirementsSatisfaction( internal fun missingRequiredGold(minPrice: Int) = RequirementsSatisfaction(false, PlayabilityLevel.MISSING_REQUIRED_GOLD, minPrice, noTransactionOptions()) - internal fun missingGoldForResources(minPrice: Int, transactionOptions: ResourceTransactionOptions) = - RequirementsSatisfaction(false, PlayabilityLevel.MISSING_GOLD_FOR_RES, minPrice, transactionOptions) + internal fun missingGoldForResources(minPrice: Int) = + RequirementsSatisfaction(false, PlayabilityLevel.MISSING_GOLD_FOR_RES, minPrice, noTransactionOptions()) internal fun unavailableResources() = RequirementsSatisfaction(false, PlayabilityLevel.UNAVAILABLE_RESOURCES, Int.MAX_VALUE, noTransactionOptions()) |