diff options
Diffstat (limited to 'sw-common-model/src/commonMain')
-rw-r--r-- | sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/PlayerState.kt | 2 | ||||
-rw-r--r-- | sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/TurnActions.kt | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/PlayerState.kt b/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/PlayerState.kt index 90d23aa9..1e483a56 100644 --- a/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/PlayerState.kt +++ b/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/PlayerState.kt @@ -14,4 +14,4 @@ data class PlayerTurnInfo( } // TODO move to server code -fun Collection<PlayerTurnInfo>.hideHandsAndWaitForReadiness() = map { it.copy(action = TurnAction.SayReady()) } +fun Collection<PlayerTurnInfo>.hideHandsAndWaitForReadiness() = map { it.copy(action = TurnAction.SayReady) } diff --git a/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/TurnActions.kt b/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/TurnActions.kt index bd94944b..af01dccd 100644 --- a/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/TurnActions.kt +++ b/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/TurnActions.kt @@ -23,9 +23,11 @@ sealed class TurnAction { abstract val message: String @Serializable - data class SayReady( - override val message: String = ActionMessages.SAY_READY, - ) : TurnAction() + object SayReady : TurnAction() { + override val message: String = ActionMessages.SAY_READY + + override fun toString(): String = "Say Ready" + } @Serializable data class PlayFromHand( |