From 88e992b0e94d92ac9ac26e8d2d72d818292841ca Mon Sep 17 00:00:00 2001 From: Joffrey Bion Date: Sun, 29 Mar 2020 18:08:49 +0200 Subject: Rename GameState -> TableState --- .../kotlin/org/luxons/sevenwonders/model/GameState.kt | 17 ----------------- .../kotlin/org/luxons/sevenwonders/model/Moves.kt | 2 +- .../kotlin/org/luxons/sevenwonders/model/TableState.kt | 17 +++++++++++++++++ 3 files changed, 18 insertions(+), 18 deletions(-) delete mode 100644 sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/GameState.kt create mode 100644 sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/TableState.kt (limited to 'sw-common-model') diff --git a/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/GameState.kt b/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/GameState.kt deleted file mode 100644 index 29423cd7..00000000 --- a/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/GameState.kt +++ /dev/null @@ -1,17 +0,0 @@ -package org.luxons.sevenwonders.model - -import kotlinx.serialization.Serializable -import org.luxons.sevenwonders.model.boards.Board -import org.luxons.sevenwonders.model.cards.HandRotationDirection - -typealias Age = Int - -@Serializable -data class GameState( - val boards: List, - val currentAge: Age, - val handRotationDirection: HandRotationDirection, - val lastPlayedMoves: List -) { - val nbPlayers: Int = boards.size -} diff --git a/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/Moves.kt b/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/Moves.kt index 22cbfc8c..d684505e 100644 --- a/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/Moves.kt +++ b/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/Moves.kt @@ -19,7 +19,7 @@ enum class Action(val message: String) { @Serializable data class PlayerTurnInfo( val playerIndex: Int, - val table: GameState, + val table: TableState, val action: Action, val hand: List?, val preparedMove: PlayedMove?, diff --git a/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/TableState.kt b/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/TableState.kt new file mode 100644 index 00000000..1f1ed3ee --- /dev/null +++ b/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/TableState.kt @@ -0,0 +1,17 @@ +package org.luxons.sevenwonders.model + +import kotlinx.serialization.Serializable +import org.luxons.sevenwonders.model.boards.Board +import org.luxons.sevenwonders.model.cards.HandRotationDirection + +typealias Age = Int + +@Serializable +data class TableState( + val boards: List, + val currentAge: Age, + val handRotationDirection: HandRotationDirection, + val lastPlayedMoves: List +) { + val nbPlayers: Int = boards.size +} -- cgit