summaryrefslogtreecommitdiff
path: root/sw-common-model
diff options
context:
space:
mode:
authorJoffrey BION <joffrey.bion@gmail.com>2019-05-22 03:00:54 +0200
committerJoffrey BION <joffrey.bion@gmail.com>2019-05-22 03:00:54 +0200
commit4a328a310384300e00527bbcbdaa9efbc4453547 (patch)
tree2f09067d2681bc199ef686722a617df5b30a7150 /sw-common-model
parentReorganize packages again (diff)
downloadseven-wonders-4a328a310384300e00527bbcbdaa9efbc4453547.tar.gz
seven-wonders-4a328a310384300e00527bbcbdaa9efbc4453547.tar.bz2
seven-wonders-4a328a310384300e00527bbcbdaa9efbc4453547.zip
Use import aliases to remove annoying prefixes
Diffstat (limited to 'sw-common-model')
-rw-r--r--sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/GameState.kt (renamed from sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/Table.kt)6
-rw-r--r--sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/Moves.kt2
-rw-r--r--sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/boards/Boards.kt18
-rw-r--r--sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/cards/Cards.kt6
-rw-r--r--sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/wonders/Wonders.kt4
5 files changed, 18 insertions, 18 deletions
diff --git a/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/Table.kt b/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/GameState.kt
index 2e29090e..3de605b2 100644
--- a/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/Table.kt
+++ b/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/GameState.kt
@@ -1,12 +1,12 @@
package org.luxons.sevenwonders.model
-import org.luxons.sevenwonders.model.boards.ApiBoard
+import org.luxons.sevenwonders.model.boards.Board
import org.luxons.sevenwonders.model.cards.HandRotationDirection
typealias Age = Int
-data class ApiTable(
- val boards: List<ApiBoard>,
+data class GameState(
+ val boards: List<Board>,
val currentAge: Age,
val handRotationDirection: HandRotationDirection,
val lastPlayedMoves: List<PlayedMove>
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 9a80b82a..8206ec8d 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
@@ -16,7 +16,7 @@ enum class Action(val message: String) {
data class PlayerTurnInfo(
val playerIndex: Int,
- val table: ApiTable,
+ val table: GameState,
val action: Action,
val hand: List<HandCard>,
val preparedMove: PlayedMove?,
diff --git a/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/boards/Boards.kt b/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/boards/Boards.kt
index a91b2488..d06e203d 100644
--- a/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/boards/Boards.kt
+++ b/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/boards/Boards.kt
@@ -5,34 +5,34 @@ import org.luxons.sevenwonders.model.resources.CountedResource
import org.luxons.sevenwonders.model.resources.ResourceType
import org.luxons.sevenwonders.model.wonders.ApiWonder
-data class ApiBoard(
+data class Board(
val playerIndex: Int,
val wonder: ApiWonder,
- val production: ApiProduction,
- val publicProduction: ApiProduction,
- val science: ApiScience,
- val military: ApiMilitary,
+ val production: Production,
+ val publicProduction: Production,
+ val science: Science,
+ val military: Military,
val playedCards: List<List<TableCard>>,
val gold: Int
)
-data class ApiRequirements(
+data class Requirements(
val gold: Int = 0,
val resources: List<CountedResource> = emptyList()
)
-data class ApiProduction(
+data class Production(
val fixedResources: List<CountedResource>,
val alternativeResources: Set<Set<ResourceType>>
)
-data class ApiMilitary(
+data class Military(
val nbShields: Int,
val totalPoints: Int,
val nbDefeatTokens: Int
)
-data class ApiScience(
+data class Science(
val jokers: Int,
val nbWheels: Int,
val nbCompasses: Int,
diff --git a/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/cards/Cards.kt b/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/cards/Cards.kt
index d0121019..57cf3a00 100644
--- a/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/cards/Cards.kt
+++ b/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/cards/Cards.kt
@@ -1,12 +1,12 @@
package org.luxons.sevenwonders.model.cards
-import org.luxons.sevenwonders.model.boards.ApiRequirements
+import org.luxons.sevenwonders.model.boards.Requirements
import org.luxons.sevenwonders.model.resources.ResourceTransactions
data class TableCard(
val name: String,
val color: Color,
- val requirements: ApiRequirements,
+ val requirements: Requirements,
val chainParent: String?,
val chainChildren: List<String>,
val image: String,
@@ -21,7 +21,7 @@ data class TableCard(
data class HandCard(
val name: String,
val color: Color,
- val requirements: ApiRequirements,
+ val requirements: Requirements,
val chainParent: String?,
val chainChildren: List<String>,
val image: String,
diff --git a/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/wonders/Wonders.kt b/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/wonders/Wonders.kt
index 73fd6a30..a6273c5a 100644
--- a/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/wonders/Wonders.kt
+++ b/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/wonders/Wonders.kt
@@ -1,6 +1,6 @@
package org.luxons.sevenwonders.model.wonders
-import org.luxons.sevenwonders.model.boards.ApiRequirements
+import org.luxons.sevenwonders.model.boards.Requirements
import org.luxons.sevenwonders.model.cards.CardBack
import org.luxons.sevenwonders.model.cards.PlayabilityLevel
import org.luxons.sevenwonders.model.resources.ResourceTransactions
@@ -18,7 +18,7 @@ data class ApiWonder(
data class ApiWonderStage(
val cardBack: CardBack?,
val isBuilt: Boolean,
- val requirements: ApiRequirements,
+ val requirements: Requirements,
val builtDuringLastMove: Boolean
)
bgstack15