summaryrefslogtreecommitdiff
path: root/sw-common-model
diff options
context:
space:
mode:
Diffstat (limited to 'sw-common-model')
-rw-r--r--sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/resources/Resources.kt8
1 files changed, 6 insertions, 2 deletions
diff --git a/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/resources/Resources.kt b/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/resources/Resources.kt
index fc99a41d..3bf19964 100644
--- a/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/resources/Resources.kt
+++ b/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/resources/Resources.kt
@@ -32,7 +32,9 @@ enum class ResourceType(val symbol: Char) {
data class CountedResource(
val count: Int,
val type: ResourceType,
-)
+) {
+ override fun toString(): String = "$count $type"
+}
@Serializable
enum class Provider(val boardPosition: RelativeBoardPosition) {
@@ -53,7 +55,9 @@ data class PricedResourceTransaction(
override val provider: Provider,
override val resources: List<CountedResource>,
val totalPrice: Int,
-) : ResourceTransaction()
+) : ResourceTransaction() {
+ override fun toString(): String = "{$totalPrice coin(s) to $provider for $resources}"
+}
typealias PricedResourceTransactions = Set<PricedResourceTransaction>
bgstack15