summaryrefslogtreecommitdiff
path: root/sw-engine/src/main/kotlin/org
diff options
context:
space:
mode:
authorJoffrey BION <joffrey.bion@gmail.com>2019-05-22 02:40:48 +0200
committerJoffrey BION <joffrey.bion@gmail.com>2019-05-22 02:40:48 +0200
commit157edc9b8027f63998758d3c91cbaa1053550f0f (patch)
tree3c5b1b6b4c3c33f1493d6ef2a5ec71a796b24603 /sw-engine/src/main/kotlin/org
parentReorder subprojects in settings.gradle to make more sense (diff)
downloadseven-wonders-157edc9b8027f63998758d3c91cbaa1053550f0f.tar.gz
seven-wonders-157edc9b8027f63998758d3c91cbaa1053550f0f.tar.bz2
seven-wonders-157edc9b8027f63998758d3c91cbaa1053550f0f.zip
Reorganize packages again
Diffstat (limited to 'sw-engine/src/main/kotlin/org')
-rw-r--r--sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/Game.kt (renamed from sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/Game.kt)54
-rw-r--r--sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/Player.kt (renamed from sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/Player.kt)10
-rw-r--r--sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/Settings.kt (renamed from sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/Settings.kt)8
-rw-r--r--sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/boards/Board.kt (renamed from sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/boards/Board.kt)28
-rw-r--r--sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/boards/Military.kt (renamed from sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/boards/Military.kt)4
-rw-r--r--sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/boards/Science.kt (renamed from sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/boards/Science.kt)2
-rw-r--r--sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/boards/Table.kt (renamed from sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/boards/Table.kt)18
-rw-r--r--sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/cards/Cards.kt (renamed from sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/cards/Cards.kt)20
-rw-r--r--sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/cards/Decks.kt (renamed from sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/cards/Decks.kt)2
-rw-r--r--sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/cards/Hands.kt (renamed from sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/cards/Hands.kt)10
-rw-r--r--sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/cards/Requirements.kt (renamed from sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/cards/Requirements.kt)18
-rw-r--r--sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/cards/RequirementsSatisfaction.kt (renamed from sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/cards/RequirementsSatisfaction.kt)24
-rw-r--r--sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/converters/Boards.kt (renamed from sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/api/Boards.kt)43
-rw-r--r--sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/converters/Cards.kt (renamed from sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/api/Cards.kt)12
-rw-r--r--sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/converters/Table.kt (renamed from sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/api/Table.kt)12
-rw-r--r--sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/data/GameDefinition.kt (renamed from sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/data/GameDefinition.kt)46
-rw-r--r--sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/data/definitions/CardDefinition.kt (renamed from sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/data/definitions/CardDefinition.kt)10
-rw-r--r--sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/data/definitions/DecksDefinition.kt (renamed from sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/data/definitions/DecksDefinition.kt)8
-rw-r--r--sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/data/definitions/EffectsDefinition.kt (renamed from sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/data/definitions/EffectsDefinition.kt)22
-rw-r--r--sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/data/definitions/WonderDefinition.kt (renamed from sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/data/definitions/WonderDefinition.kt)12
-rw-r--r--sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/data/serializers/NumericEffectSerializer.kt (renamed from sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/data/serializers/NumericEffectSerializer.kt)10
-rw-r--r--sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/data/serializers/ProductionIncreaseSerializer.kt (renamed from sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/data/serializers/ProductionIncreaseSerializer.kt)6
-rw-r--r--sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/data/serializers/ProductionSerializer.kt (renamed from sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/data/serializers/ProductionSerializer.kt)8
-rw-r--r--sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/data/serializers/ResourceTypeSerializer.kt (renamed from sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/data/serializers/ResourceTypeSerializer.kt)4
-rw-r--r--sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/data/serializers/ResourceTypesSerializer.kt (renamed from sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/data/serializers/ResourceTypesSerializer.kt)4
-rw-r--r--sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/data/serializers/ResourcesSerializer.kt (renamed from sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/data/serializers/ResourcesSerializer.kt)8
-rw-r--r--sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/data/serializers/ScienceProgressSerializer.kt (renamed from sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/data/serializers/ScienceProgressSerializer.kt)8
-rw-r--r--sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/effects/BonusPerBoardElement.kt (renamed from sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/effects/BonusPerBoardElement.kt)10
-rw-r--r--sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/effects/Discount.kt (renamed from sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/effects/Discount.kt)8
-rw-r--r--sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/effects/Effect.kt (renamed from sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/effects/Effect.kt)4
-rw-r--r--sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/effects/EndGameEffect.kt (renamed from sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/effects/EndGameEffect.kt)4
-rw-r--r--sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/effects/GoldIncrease.kt (renamed from sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/effects/GoldIncrease.kt)4
-rw-r--r--sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/effects/InstantOwnBoardEffect.kt (renamed from sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/effects/InstantOwnBoardEffect.kt)6
-rw-r--r--sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/effects/MilitaryReinforcements.kt (renamed from sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/effects/MilitaryReinforcements.kt)4
-rw-r--r--sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/effects/ProductionIncrease.kt (renamed from sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/effects/ProductionIncrease.kt)6
-rw-r--r--sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/effects/RawPointsIncrease.kt (renamed from sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/effects/RawPointsIncrease.kt)4
-rw-r--r--sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/effects/ScienceProgress.kt (renamed from sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/effects/ScienceProgress.kt)6
-rw-r--r--sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/effects/SpecialAbility.kt (renamed from sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/effects/SpecialAbility.kt)6
-rw-r--r--sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/effects/SpecialAbilityActivation.kt (renamed from sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/effects/SpecialAbilityActivation.kt)4
-rw-r--r--sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/moves/BuildWonderMove.kt (renamed from sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/moves/BuildWonderMove.kt)10
-rw-r--r--sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/moves/CardFromHandMove.kt (renamed from sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/moves/CardFromHandMove.kt)8
-rw-r--r--sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/moves/CopyGuildMove.kt (renamed from sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/moves/CopyGuildMove.kt)16
-rw-r--r--sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/moves/DiscardMove.kt (renamed from sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/moves/DiscardMove.kt)10
-rw-r--r--sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/moves/Move.kt (renamed from sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/moves/Move.kt)14
-rw-r--r--sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/moves/PlayCardMove.kt (renamed from sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/moves/PlayCardMove.kt)10
-rw-r--r--sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/moves/PlayFreeCardMove.kt (renamed from sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/moves/PlayFreeCardMove.kt)10
-rw-r--r--sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/resources/BestPriceCalculator.kt (renamed from sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/resources/BestPriceCalculator.kt)10
-rw-r--r--sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/resources/Production.kt (renamed from sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/resources/Production.kt)4
-rw-r--r--sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/resources/ResourceTransactions.kt (renamed from sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/resources/ResourceTransactions.kt)16
-rw-r--r--sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/resources/Resources.kt (renamed from sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/resources/Resources.kt)4
-rw-r--r--sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/resources/TradingRules.kt (renamed from sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/resources/TradingRules.kt)10
-rw-r--r--sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/score/Score.kt (renamed from sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/score/Score.kt)2
-rw-r--r--sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/wonders/Wonder.kt (renamed from sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/wonders/Wonder.kt)21
-rw-r--r--sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/wonders/WonderStage.kt (renamed from sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/wonders/WonderStage.kt)14
54 files changed, 324 insertions, 312 deletions
diff --git a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/Game.kt b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/Game.kt
index b8866e9f..bbd96d33 100644
--- a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/Game.kt
+++ b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/Game.kt
@@ -1,24 +1,24 @@
-package org.luxons.sevenwonders.game
-
-import org.luxons.sevenwonders.game.api.Action
-import org.luxons.sevenwonders.game.api.cards.HandCard
-import org.luxons.sevenwonders.game.api.PlayerMove
-import org.luxons.sevenwonders.game.api.PlayerTurnInfo
-import org.luxons.sevenwonders.game.api.toApiTable
-import org.luxons.sevenwonders.game.api.toPlayedMove
-import org.luxons.sevenwonders.game.api.toTableCard
-import org.luxons.sevenwonders.game.boards.Board
-import org.luxons.sevenwonders.game.boards.Table
-import org.luxons.sevenwonders.game.cards.Card
-import org.luxons.sevenwonders.game.api.cards.CardBack
-import org.luxons.sevenwonders.game.cards.Decks
-import org.luxons.sevenwonders.game.cards.Hands
-import org.luxons.sevenwonders.game.data.LAST_AGE
-import org.luxons.sevenwonders.game.effects.SpecialAbility
-import org.luxons.sevenwonders.game.moves.Move
-import org.luxons.sevenwonders.game.moves.resolve
-import org.luxons.sevenwonders.game.score.ScoreBoard
-import org.luxons.sevenwonders.game.api.ApiTable as ApiTable
+package org.luxons.sevenwonders.engine
+
+import org.luxons.sevenwonders.engine.boards.Board
+import org.luxons.sevenwonders.engine.boards.Table
+import org.luxons.sevenwonders.engine.cards.Card
+import org.luxons.sevenwonders.engine.cards.Decks
+import org.luxons.sevenwonders.engine.cards.Hands
+import org.luxons.sevenwonders.engine.converters.toApiTable
+import org.luxons.sevenwonders.engine.converters.toPlayedMove
+import org.luxons.sevenwonders.engine.converters.toTableCard
+import org.luxons.sevenwonders.engine.data.LAST_AGE
+import org.luxons.sevenwonders.engine.effects.SpecialAbility
+import org.luxons.sevenwonders.engine.moves.Move
+import org.luxons.sevenwonders.engine.moves.resolve
+import org.luxons.sevenwonders.engine.score.ScoreBoard
+import org.luxons.sevenwonders.model.Action
+import org.luxons.sevenwonders.model.ApiTable
+import org.luxons.sevenwonders.model.PlayerMove
+import org.luxons.sevenwonders.model.PlayerTurnInfo
+import org.luxons.sevenwonders.model.cards.CardBack
+import org.luxons.sevenwonders.model.cards.HandCard
class Game internal constructor(
val id: Long,
@@ -53,12 +53,12 @@ class Game internal constructor(
val neighbourGuildCards = table.getNeighbourGuildCards(player.index).map { it.toTableCard(null) }
return PlayerTurnInfo(
- playerIndex = player.index,
- table = table.toApiTable(),
- action = action,
- hand = hand,
- preparedMove = preparedMoves[player.index]?.toPlayedMove(),
- neighbourGuildCards = neighbourGuildCards
+ playerIndex = player.index,
+ table = table.toApiTable(),
+ action = action,
+ hand = hand,
+ preparedMove = preparedMoves[player.index]?.toPlayedMove(),
+ neighbourGuildCards = neighbourGuildCards
)
}
diff --git a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/Player.kt b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/Player.kt
index 877ea530..e28fa7bf 100644
--- a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/Player.kt
+++ b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/Player.kt
@@ -1,9 +1,9 @@
-package org.luxons.sevenwonders.game
+package org.luxons.sevenwonders.engine
-import org.luxons.sevenwonders.game.boards.Board
-import org.luxons.sevenwonders.game.api.boards.RelativeBoardPosition
-import org.luxons.sevenwonders.game.boards.Table
-import org.luxons.sevenwonders.game.cards.Card
+import org.luxons.sevenwonders.engine.boards.Board
+import org.luxons.sevenwonders.engine.boards.Table
+import org.luxons.sevenwonders.engine.cards.Card
+import org.luxons.sevenwonders.model.boards.RelativeBoardPosition
internal interface Player {
val index: Int
diff --git a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/Settings.kt b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/Settings.kt
index ad6cb105..7461762a 100644
--- a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/Settings.kt
+++ b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/Settings.kt
@@ -1,8 +1,8 @@
-package org.luxons.sevenwonders.game
+package org.luxons.sevenwonders.engine
-import org.luxons.sevenwonders.game.api.CustomizableSettings
-import org.luxons.sevenwonders.game.api.WonderSide
-import org.luxons.sevenwonders.game.api.WonderSidePickMethod
+import org.luxons.sevenwonders.model.CustomizableSettings
+import org.luxons.sevenwonders.model.WonderSide
+import org.luxons.sevenwonders.model.WonderSidePickMethod
import kotlin.random.Random
internal class Settings(
diff --git a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/boards/Board.kt b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/boards/Board.kt
index 38bae9ea..a98da0bf 100644
--- a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/boards/Board.kt
+++ b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/boards/Board.kt
@@ -1,17 +1,17 @@
-package org.luxons.sevenwonders.game.boards
-
-import org.luxons.sevenwonders.game.Player
-import org.luxons.sevenwonders.game.Settings
-import org.luxons.sevenwonders.game.api.Age
-import org.luxons.sevenwonders.game.cards.Card
-import org.luxons.sevenwonders.game.api.cards.Color
-import org.luxons.sevenwonders.game.effects.SpecialAbility
-import org.luxons.sevenwonders.game.resources.Production
-import org.luxons.sevenwonders.game.resources.TradingRules
-import org.luxons.sevenwonders.game.resources.mutableResourcesOf
-import org.luxons.sevenwonders.game.score.PlayerScore
-import org.luxons.sevenwonders.game.score.ScoreCategory
-import org.luxons.sevenwonders.game.wonders.Wonder
+package org.luxons.sevenwonders.engine.boards
+
+import org.luxons.sevenwonders.engine.Player
+import org.luxons.sevenwonders.engine.Settings
+import org.luxons.sevenwonders.engine.cards.Card
+import org.luxons.sevenwonders.engine.effects.SpecialAbility
+import org.luxons.sevenwonders.engine.resources.Production
+import org.luxons.sevenwonders.engine.resources.TradingRules
+import org.luxons.sevenwonders.engine.resources.mutableResourcesOf
+import org.luxons.sevenwonders.engine.score.PlayerScore
+import org.luxons.sevenwonders.engine.score.ScoreCategory
+import org.luxons.sevenwonders.engine.wonders.Wonder
+import org.luxons.sevenwonders.model.Age
+import org.luxons.sevenwonders.model.cards.Color
internal class Board(val wonder: Wonder, val playerIndex: Int, settings: Settings) {
diff --git a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/boards/Military.kt b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/boards/Military.kt
index 98404d94..a4cb4ee8 100644
--- a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/boards/Military.kt
+++ b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/boards/Military.kt
@@ -1,6 +1,6 @@
-package org.luxons.sevenwonders.game.boards
+package org.luxons.sevenwonders.engine.boards
-import org.luxons.sevenwonders.game.api.Age
+import org.luxons.sevenwonders.model.Age
internal class Military(
private val lostPointsPerDefeat: Int,
diff --git a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/boards/Science.kt b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/boards/Science.kt
index a152c7db..436d8995 100644
--- a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/boards/Science.kt
+++ b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/boards/Science.kt
@@ -1,4 +1,4 @@
-package org.luxons.sevenwonders.game.boards
+package org.luxons.sevenwonders.engine.boards
enum class ScienceType {
COMPASS,
diff --git a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/boards/Table.kt b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/boards/Table.kt
index 04b3d104..b8da6ae7 100644
--- a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/boards/Table.kt
+++ b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/boards/Table.kt
@@ -1,12 +1,12 @@
-package org.luxons.sevenwonders.game.boards
-
-import org.luxons.sevenwonders.game.api.Age
-import org.luxons.sevenwonders.game.api.boards.RelativeBoardPosition
-import org.luxons.sevenwonders.game.api.boards.neighboursPositions
-import org.luxons.sevenwonders.game.cards.Card
-import org.luxons.sevenwonders.game.api.cards.Color
-import org.luxons.sevenwonders.game.api.cards.HandRotationDirection
-import org.luxons.sevenwonders.game.moves.Move
+package org.luxons.sevenwonders.engine.boards
+
+import org.luxons.sevenwonders.engine.cards.Card
+import org.luxons.sevenwonders.engine.moves.Move
+import org.luxons.sevenwonders.model.Age
+import org.luxons.sevenwonders.model.boards.RelativeBoardPosition
+import org.luxons.sevenwonders.model.boards.neighboursPositions
+import org.luxons.sevenwonders.model.cards.Color
+import org.luxons.sevenwonders.model.cards.HandRotationDirection
/**
* The table contains what is visible by all the players in the game: the boards and their played cards, and the
diff --git a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/cards/Cards.kt b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/cards/Cards.kt
index b179a2e4..cfa46d27 100644
--- a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/cards/Cards.kt
+++ b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/cards/Cards.kt
@@ -1,14 +1,14 @@
-package org.luxons.sevenwonders.game.cards
+package org.luxons.sevenwonders.engine.cards
-import org.luxons.sevenwonders.game.Player
-import org.luxons.sevenwonders.game.api.cards.CardBack
-import org.luxons.sevenwonders.game.api.cards.CardPlayability
-import org.luxons.sevenwonders.game.api.cards.Color
-import org.luxons.sevenwonders.game.api.cards.PlayabilityLevel
-import org.luxons.sevenwonders.game.boards.Board
-import org.luxons.sevenwonders.game.effects.Effect
-import org.luxons.sevenwonders.game.api.resources.ResourceTransactions
-import org.luxons.sevenwonders.game.api.resources.noTransactions
+import org.luxons.sevenwonders.engine.Player
+import org.luxons.sevenwonders.engine.boards.Board
+import org.luxons.sevenwonders.engine.effects.Effect
+import org.luxons.sevenwonders.model.cards.CardBack
+import org.luxons.sevenwonders.model.cards.CardPlayability
+import org.luxons.sevenwonders.model.cards.Color
+import org.luxons.sevenwonders.model.cards.PlayabilityLevel
+import org.luxons.sevenwonders.model.resources.ResourceTransactions
+import org.luxons.sevenwonders.model.resources.noTransactions
internal data class Card(
val name: String,
diff --git a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/cards/Decks.kt b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/cards/Decks.kt
index f3c5d471..01026722 100644
--- a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/cards/Decks.kt
+++ b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/cards/Decks.kt
@@ -1,4 +1,4 @@
-package org.luxons.sevenwonders.game.cards
+package org.luxons.sevenwonders.engine.cards
internal fun List<Card>.deal(nbPlayers: Int): Hands {
val hands: Map<Int, List<Card>> = this.withIndex()
diff --git a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/cards/Hands.kt b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/cards/Hands.kt
index 1dc5e5df..9f73cd67 100644
--- a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/cards/Hands.kt
+++ b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/cards/Hands.kt
@@ -1,9 +1,9 @@
-package org.luxons.sevenwonders.game.cards
+package org.luxons.sevenwonders.engine.cards
-import org.luxons.sevenwonders.game.Player
-import org.luxons.sevenwonders.game.api.cards.HandCard
-import org.luxons.sevenwonders.game.api.cards.HandRotationDirection
-import org.luxons.sevenwonders.game.api.toHandCard
+import org.luxons.sevenwonders.engine.Player
+import org.luxons.sevenwonders.engine.converters.toHandCard
+import org.luxons.sevenwonders.model.cards.HandCard
+import org.luxons.sevenwonders.model.cards.HandRotationDirection
internal class Hands(private val hands: List<List<Card>>) {
diff --git a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/cards/Requirements.kt b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/cards/Requirements.kt
index 3cdf8141..b9ffe247 100644
--- a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/cards/Requirements.kt
+++ b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/cards/Requirements.kt
@@ -1,13 +1,13 @@
-package org.luxons.sevenwonders.game.cards
+package org.luxons.sevenwonders.engine.cards
-import org.luxons.sevenwonders.game.Player
-import org.luxons.sevenwonders.game.boards.Board
-import org.luxons.sevenwonders.game.api.resources.ResourceTransactions
-import org.luxons.sevenwonders.game.resources.Resources
-import org.luxons.sevenwonders.game.resources.asResources
-import org.luxons.sevenwonders.game.resources.bestSolution
-import org.luxons.sevenwonders.game.resources.emptyResources
-import org.luxons.sevenwonders.game.resources.execute
+import org.luxons.sevenwonders.engine.Player
+import org.luxons.sevenwonders.engine.boards.Board
+import org.luxons.sevenwonders.engine.resources.Resources
+import org.luxons.sevenwonders.engine.resources.asResources
+import org.luxons.sevenwonders.engine.resources.bestSolution
+import org.luxons.sevenwonders.engine.resources.emptyResources
+import org.luxons.sevenwonders.engine.resources.execute
+import org.luxons.sevenwonders.model.resources.ResourceTransactions
data class Requirements internal constructor(
val gold: Int = 0,
diff --git a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/cards/RequirementsSatisfaction.kt b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/cards/RequirementsSatisfaction.kt
index 3df2811f..1c5ca8dc 100644
--- a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/cards/RequirementsSatisfaction.kt
+++ b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/cards/RequirementsSatisfaction.kt
@@ -1,8 +1,8 @@
-package org.luxons.sevenwonders.game.cards
+package org.luxons.sevenwonders.engine.cards
-import org.luxons.sevenwonders.game.api.cards.PlayabilityLevel
-import org.luxons.sevenwonders.game.api.resources.ResourceTransactions
-import org.luxons.sevenwonders.game.api.resources.noTransactions
+import org.luxons.sevenwonders.model.cards.PlayabilityLevel
+import org.luxons.sevenwonders.model.resources.ResourceTransactions
+import org.luxons.sevenwonders.model.resources.noTransactions
internal data class RequirementsSatisfaction(
val satisfied: Boolean,
@@ -13,16 +13,24 @@ internal data class RequirementsSatisfaction(
companion object {
internal fun noRequirements() =
- RequirementsSatisfaction(true, PlayabilityLevel.NO_REQUIREMENTS, 0, setOf(noTransactions()))
+ RequirementsSatisfaction(true, PlayabilityLevel.NO_REQUIREMENTS, 0, setOf(
+ noTransactions()
+ ))
internal fun enoughResources() =
- RequirementsSatisfaction(true, PlayabilityLevel.ENOUGH_RESOURCES, 0, setOf(noTransactions()))
+ RequirementsSatisfaction(true, PlayabilityLevel.ENOUGH_RESOURCES, 0, setOf(
+ noTransactions()
+ ))
internal fun enoughGold(minPrice: Int) =
- RequirementsSatisfaction(true, PlayabilityLevel.ENOUGH_GOLD, minPrice, setOf(noTransactions()))
+ RequirementsSatisfaction(true, PlayabilityLevel.ENOUGH_GOLD, minPrice, setOf(
+ noTransactions()
+ ))
internal fun enoughResourcesAndGold(minPrice: Int) =
- RequirementsSatisfaction(true, PlayabilityLevel.ENOUGH_GOLD_AND_RES, minPrice, setOf(noTransactions()))
+ RequirementsSatisfaction(true, PlayabilityLevel.ENOUGH_GOLD_AND_RES, minPrice, setOf(
+ noTransactions()
+ ))
internal fun metWithHelp(minPrice: Int, cheapestTransactions: Set<ResourceTransactions>) =
RequirementsSatisfaction(true, PlayabilityLevel.REQUIRES_HELP, minPrice, cheapestTransactions)
diff --git a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/api/Boards.kt b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/converters/Boards.kt
index a9e3232d..ad03c228 100644
--- a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/api/Boards.kt
+++ b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/converters/Boards.kt
@@ -1,25 +1,26 @@
-package org.luxons.sevenwonders.game.api
+package org.luxons.sevenwonders.engine.converters
-import org.luxons.sevenwonders.game.Player
-import org.luxons.sevenwonders.game.api.boards.ApiBoard
-import org.luxons.sevenwonders.game.api.boards.ApiMilitary
-import org.luxons.sevenwonders.game.api.boards.ApiProduction
-import org.luxons.sevenwonders.game.api.boards.ApiRequirements
-import org.luxons.sevenwonders.game.api.boards.ApiScience
-import org.luxons.sevenwonders.game.boards.Military
-import org.luxons.sevenwonders.game.boards.Science
-import org.luxons.sevenwonders.game.boards.ScienceType
-import org.luxons.sevenwonders.game.cards.Requirements
-import org.luxons.sevenwonders.game.api.cards.TableCard
-import org.luxons.sevenwonders.game.moves.Move
-import org.luxons.sevenwonders.game.api.resources.CountedResource
-import org.luxons.sevenwonders.game.resources.Production
-import org.luxons.sevenwonders.game.resources.Resources
-import org.luxons.sevenwonders.game.api.wonders.ApiWonder
-import org.luxons.sevenwonders.game.api.wonders.ApiWonderStage
-import org.luxons.sevenwonders.game.boards.Board as InternalBoard
-import org.luxons.sevenwonders.game.wonders.Wonder as InternalWonder
-import org.luxons.sevenwonders.game.wonders.WonderStage as InternalWonderStage
+import org.luxons.sevenwonders.engine.Player
+import org.luxons.sevenwonders.engine.boards.Military
+import org.luxons.sevenwonders.engine.boards.Science
+import org.luxons.sevenwonders.engine.boards.ScienceType
+import org.luxons.sevenwonders.engine.cards.Requirements
+import org.luxons.sevenwonders.engine.moves.Move
+import org.luxons.sevenwonders.engine.resources.Production
+import org.luxons.sevenwonders.engine.resources.Resources
+import org.luxons.sevenwonders.model.MoveType
+import org.luxons.sevenwonders.model.boards.ApiBoard
+import org.luxons.sevenwonders.model.boards.ApiMilitary
+import org.luxons.sevenwonders.model.boards.ApiProduction
+import org.luxons.sevenwonders.model.boards.ApiRequirements
+import org.luxons.sevenwonders.model.boards.ApiScience
+import org.luxons.sevenwonders.model.cards.TableCard
+import org.luxons.sevenwonders.model.resources.CountedResource
+import org.luxons.sevenwonders.model.wonders.ApiWonder
+import org.luxons.sevenwonders.model.wonders.ApiWonderStage
+import org.luxons.sevenwonders.engine.boards.Board as InternalBoard
+import org.luxons.sevenwonders.engine.wonders.Wonder as InternalWonder
+import org.luxons.sevenwonders.engine.wonders.WonderStage as InternalWonderStage
internal fun InternalBoard.toApiBoard(player: Player, lastMove: Move?): ApiBoard =
ApiBoard(
diff --git a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/api/Cards.kt b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/converters/Cards.kt
index 9580e3be..3d3471bf 100644
--- a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/api/Cards.kt
+++ b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/converters/Cards.kt
@@ -1,10 +1,10 @@
-package org.luxons.sevenwonders.game.api
+package org.luxons.sevenwonders.engine.converters
-import org.luxons.sevenwonders.game.Player
-import org.luxons.sevenwonders.game.cards.Card
-import org.luxons.sevenwonders.game.api.cards.HandCard
-import org.luxons.sevenwonders.game.api.cards.TableCard
-import org.luxons.sevenwonders.game.moves.Move
+import org.luxons.sevenwonders.engine.Player
+import org.luxons.sevenwonders.engine.cards.Card
+import org.luxons.sevenwonders.engine.moves.Move
+import org.luxons.sevenwonders.model.cards.HandCard
+import org.luxons.sevenwonders.model.cards.TableCard
internal fun Card.toTableCard(lastMove: Move? = null): TableCard =
TableCard(
diff --git a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/api/Table.kt b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/converters/Table.kt
index a5f95456..d2f5410b 100644
--- a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/api/Table.kt
+++ b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/converters/Table.kt
@@ -1,10 +1,12 @@
-package org.luxons.sevenwonders.game.api
+package org.luxons.sevenwonders.engine.converters
-import org.luxons.sevenwonders.game.SimplePlayer
-import org.luxons.sevenwonders.game.moves.Move
-import org.luxons.sevenwonders.game.boards.Table as InternalTable
+import org.luxons.sevenwonders.engine.SimplePlayer
+import org.luxons.sevenwonders.engine.boards.Table
+import org.luxons.sevenwonders.engine.moves.Move
+import org.luxons.sevenwonders.model.ApiTable
+import org.luxons.sevenwonders.model.PlayedMove
-internal fun InternalTable.toApiTable(): ApiTable = ApiTable(
+internal fun Table.toApiTable(): ApiTable = ApiTable(
boards = boards.mapIndexed { i, b -> b.toApiBoard(SimplePlayer(i, this), lastPlayedMoves.getOrNull(i)) },
currentAge = currentAge,
handRotationDirection = handRotationDirection,
diff --git a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/data/GameDefinition.kt b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/data/GameDefinition.kt
index f682b970..962b88e1 100644
--- a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/data/GameDefinition.kt
+++ b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/data/GameDefinition.kt
@@ -1,30 +1,30 @@
-package org.luxons.sevenwonders.game.data
+package org.luxons.sevenwonders.engine.data
import com.github.salomonbrys.kotson.typeToken
import com.google.gson.Gson
import com.google.gson.GsonBuilder
-import org.luxons.sevenwonders.game.Game
-import org.luxons.sevenwonders.game.Settings
-import org.luxons.sevenwonders.game.api.Age
-import org.luxons.sevenwonders.game.api.CustomizableSettings
-import org.luxons.sevenwonders.game.boards.Board
-import org.luxons.sevenwonders.game.data.definitions.DecksDefinition
-import org.luxons.sevenwonders.game.data.definitions.WonderDefinition
-import org.luxons.sevenwonders.game.data.serializers.NumericEffectSerializer
-import org.luxons.sevenwonders.game.data.serializers.ProductionIncreaseSerializer
-import org.luxons.sevenwonders.game.data.serializers.ProductionSerializer
-import org.luxons.sevenwonders.game.data.serializers.ResourceTypeSerializer
-import org.luxons.sevenwonders.game.data.serializers.ResourceTypesSerializer
-import org.luxons.sevenwonders.game.data.serializers.ResourcesSerializer
-import org.luxons.sevenwonders.game.data.serializers.ScienceProgressSerializer
-import org.luxons.sevenwonders.game.effects.GoldIncrease
-import org.luxons.sevenwonders.game.effects.MilitaryReinforcements
-import org.luxons.sevenwonders.game.effects.ProductionIncrease
-import org.luxons.sevenwonders.game.effects.RawPointsIncrease
-import org.luxons.sevenwonders.game.effects.ScienceProgress
-import org.luxons.sevenwonders.game.resources.Production
-import org.luxons.sevenwonders.game.api.resources.ResourceType
-import org.luxons.sevenwonders.game.resources.Resources
+import org.luxons.sevenwonders.engine.Game
+import org.luxons.sevenwonders.engine.Settings
+import org.luxons.sevenwonders.engine.boards.Board
+import org.luxons.sevenwonders.engine.data.definitions.DecksDefinition
+import org.luxons.sevenwonders.engine.data.definitions.WonderDefinition
+import org.luxons.sevenwonders.engine.data.serializers.NumericEffectSerializer
+import org.luxons.sevenwonders.engine.data.serializers.ProductionIncreaseSerializer
+import org.luxons.sevenwonders.engine.data.serializers.ProductionSerializer
+import org.luxons.sevenwonders.engine.data.serializers.ResourceTypeSerializer
+import org.luxons.sevenwonders.engine.data.serializers.ResourceTypesSerializer
+import org.luxons.sevenwonders.engine.data.serializers.ResourcesSerializer
+import org.luxons.sevenwonders.engine.data.serializers.ScienceProgressSerializer
+import org.luxons.sevenwonders.engine.effects.GoldIncrease
+import org.luxons.sevenwonders.engine.effects.MilitaryReinforcements
+import org.luxons.sevenwonders.engine.effects.ProductionIncrease
+import org.luxons.sevenwonders.engine.effects.RawPointsIncrease
+import org.luxons.sevenwonders.engine.effects.ScienceProgress
+import org.luxons.sevenwonders.engine.resources.Production
+import org.luxons.sevenwonders.engine.resources.Resources
+import org.luxons.sevenwonders.model.Age
+import org.luxons.sevenwonders.model.CustomizableSettings
+import org.luxons.sevenwonders.model.resources.ResourceType
internal const val LAST_AGE: Age = 3
diff --git a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/data/definitions/CardDefinition.kt b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/data/definitions/CardDefinition.kt
index 879c2c68..1785ad49 100644
--- a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/data/definitions/CardDefinition.kt
+++ b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/data/definitions/CardDefinition.kt
@@ -1,9 +1,9 @@
-package org.luxons.sevenwonders.game.data.definitions
+package org.luxons.sevenwonders.engine.data.definitions
-import org.luxons.sevenwonders.game.cards.Card
-import org.luxons.sevenwonders.game.api.cards.CardBack
-import org.luxons.sevenwonders.game.api.cards.Color
-import org.luxons.sevenwonders.game.cards.Requirements
+import org.luxons.sevenwonders.engine.cards.Card
+import org.luxons.sevenwonders.engine.cards.Requirements
+import org.luxons.sevenwonders.model.cards.CardBack
+import org.luxons.sevenwonders.model.cards.Color
internal class CardDefinition(
private val name: String,
diff --git a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/data/definitions/DecksDefinition.kt b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/data/definitions/DecksDefinition.kt
index a4011e84..c4f8cdc7 100644
--- a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/data/definitions/DecksDefinition.kt
+++ b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/data/definitions/DecksDefinition.kt
@@ -1,8 +1,8 @@
-package org.luxons.sevenwonders.game.data.definitions
+package org.luxons.sevenwonders.engine.data.definitions
-import org.luxons.sevenwonders.game.cards.Card
-import org.luxons.sevenwonders.game.api.cards.CardBack
-import org.luxons.sevenwonders.game.cards.Decks
+import org.luxons.sevenwonders.engine.cards.Card
+import org.luxons.sevenwonders.engine.cards.Decks
+import org.luxons.sevenwonders.model.cards.CardBack
import kotlin.random.Random
internal class DeckDefinition(
diff --git a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/data/definitions/EffectsDefinition.kt b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/data/definitions/EffectsDefinition.kt
index 4d0348ea..0322d657 100644
--- a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/data/definitions/EffectsDefinition.kt
+++ b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/data/definitions/EffectsDefinition.kt
@@ -1,15 +1,15 @@
-package org.luxons.sevenwonders.game.data.definitions
+package org.luxons.sevenwonders.engine.data.definitions
-import org.luxons.sevenwonders.game.effects.BonusPerBoardElement
-import org.luxons.sevenwonders.game.effects.Discount
-import org.luxons.sevenwonders.game.effects.Effect
-import org.luxons.sevenwonders.game.effects.GoldIncrease
-import org.luxons.sevenwonders.game.effects.MilitaryReinforcements
-import org.luxons.sevenwonders.game.effects.ProductionIncrease
-import org.luxons.sevenwonders.game.effects.RawPointsIncrease
-import org.luxons.sevenwonders.game.effects.ScienceProgress
-import org.luxons.sevenwonders.game.effects.SpecialAbility
-import org.luxons.sevenwonders.game.effects.SpecialAbilityActivation
+import org.luxons.sevenwonders.engine.effects.BonusPerBoardElement
+import org.luxons.sevenwonders.engine.effects.Discount
+import org.luxons.sevenwonders.engine.effects.Effect
+import org.luxons.sevenwonders.engine.effects.GoldIncrease
+import org.luxons.sevenwonders.engine.effects.MilitaryReinforcements
+import org.luxons.sevenwonders.engine.effects.ProductionIncrease
+import org.luxons.sevenwonders.engine.effects.RawPointsIncrease
+import org.luxons.sevenwonders.engine.effects.ScienceProgress
+import org.luxons.sevenwonders.engine.effects.SpecialAbility
+import org.luxons.sevenwonders.engine.effects.SpecialAbilityActivation
internal class EffectsDefinition(
private val gold: GoldIncrease? = null,
diff --git a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/data/definitions/WonderDefinition.kt b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/data/definitions/WonderDefinition.kt
index 6b694acc..4c5c8e09 100644
--- a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/data/definitions/WonderDefinition.kt
+++ b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/data/definitions/WonderDefinition.kt
@@ -1,10 +1,10 @@
-package org.luxons.sevenwonders.game.data.definitions
+package org.luxons.sevenwonders.engine.data.definitions
-import org.luxons.sevenwonders.game.api.WonderSide
-import org.luxons.sevenwonders.game.cards.Requirements
-import org.luxons.sevenwonders.game.api.resources.ResourceType
-import org.luxons.sevenwonders.game.wonders.Wonder
-import org.luxons.sevenwonders.game.wonders.WonderStage
+import org.luxons.sevenwonders.engine.cards.Requirements
+import org.luxons.sevenwonders.engine.wonders.Wonder
+import org.luxons.sevenwonders.engine.wonders.WonderStage
+import org.luxons.sevenwonders.model.WonderSide
+import org.luxons.sevenwonders.model.resources.ResourceType
internal class WonderDefinition(
private val name: String,
diff --git a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/data/serializers/NumericEffectSerializer.kt b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/data/serializers/NumericEffectSerializer.kt
index 9a9a006e..a149e8a0 100644
--- a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/data/serializers/NumericEffectSerializer.kt
+++ b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/data/serializers/NumericEffectSerializer.kt
@@ -1,4 +1,4 @@
-package org.luxons.sevenwonders.game.data.serializers
+package org.luxons.sevenwonders.engine.data.serializers
import com.google.gson.JsonDeserializationContext
import com.google.gson.JsonDeserializer
@@ -7,10 +7,10 @@ import com.google.gson.JsonParseException
import com.google.gson.JsonPrimitive
import com.google.gson.JsonSerializationContext
import com.google.gson.JsonSerializer
-import org.luxons.sevenwonders.game.effects.Effect
-import org.luxons.sevenwonders.game.effects.GoldIncrease
-import org.luxons.sevenwonders.game.effects.MilitaryReinforcements
-import org.luxons.sevenwonders.game.effects.RawPointsIncrease
+import org.luxons.sevenwonders.engine.effects.Effect
+import org.luxons.sevenwonders.engine.effects.GoldIncrease
+import org.luxons.sevenwonders.engine.effects.MilitaryReinforcements
+import org.luxons.sevenwonders.engine.effects.RawPointsIncrease
import java.lang.reflect.Type
internal class NumericEffectSerializer : JsonSerializer<Effect>, JsonDeserializer<Effect> {
diff --git a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/data/serializers/ProductionIncreaseSerializer.kt b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/data/serializers/ProductionIncreaseSerializer.kt
index 0970a968..5115649f 100644
--- a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/data/serializers/ProductionIncreaseSerializer.kt
+++ b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/data/serializers/ProductionIncreaseSerializer.kt
@@ -1,4 +1,4 @@
-package org.luxons.sevenwonders.game.data.serializers
+package org.luxons.sevenwonders.engine.data.serializers
import com.google.gson.JsonDeserializationContext
import com.google.gson.JsonDeserializer
@@ -7,8 +7,8 @@ import com.google.gson.JsonParseException
import com.google.gson.JsonPrimitive
import com.google.gson.JsonSerializationContext
import com.google.gson.JsonSerializer
-import org.luxons.sevenwonders.game.effects.ProductionIncrease
-import org.luxons.sevenwonders.game.resources.Production
+import org.luxons.sevenwonders.engine.effects.ProductionIncrease
+import org.luxons.sevenwonders.engine.resources.Production
import java.lang.reflect.Type
internal class ProductionIncreaseSerializer : JsonSerializer<ProductionIncrease>, JsonDeserializer<ProductionIncrease> {
diff --git a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/data/serializers/ProductionSerializer.kt b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/data/serializers/ProductionSerializer.kt
index 9f3c4721..3f9d3797 100644
--- a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/data/serializers/ProductionSerializer.kt
+++ b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/data/serializers/ProductionSerializer.kt
@@ -1,4 +1,4 @@
-package org.luxons.sevenwonders.game.data.serializers
+package org.luxons.sevenwonders.engine.data.serializers
import com.google.gson.JsonDeserializationContext
import com.google.gson.JsonDeserializer
@@ -7,9 +7,9 @@ import com.google.gson.JsonNull
import com.google.gson.JsonParseException
import com.google.gson.JsonSerializationContext
import com.google.gson.JsonSerializer
-import org.luxons.sevenwonders.game.resources.Production
-import org.luxons.sevenwonders.game.api.resources.ResourceType
-import org.luxons.sevenwonders.game.resources.Resources
+import org.luxons.sevenwonders.engine.resources.Production
+import org.luxons.sevenwonders.engine.resources.Resources
+import org.luxons.sevenwonders.model.resources.ResourceType
import java.lang.reflect.Type
internal class ProductionSerializer : JsonSerializer<Production>, JsonDeserializer<Production> {
diff --git a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/data/serializers/ResourceTypeSerializer.kt b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/data/serializers/ResourceTypeSerializer.kt
index 37dd2cdb..b308fd24 100644
--- a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/data/serializers/ResourceTypeSerializer.kt
+++ b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/data/serializers/ResourceTypeSerializer.kt
@@ -1,4 +1,4 @@
-package org.luxons.sevenwonders.game.data.serializers
+package org.luxons.sevenwonders.engine.data.serializers
import com.google.gson.JsonDeserializationContext
import com.google.gson.JsonDeserializer
@@ -7,7 +7,7 @@ import com.google.gson.JsonParseException
import com.google.gson.JsonPrimitive
import com.google.gson.JsonSerializationContext
import com.google.gson.JsonSerializer
-import org.luxons.sevenwonders.game.api.resources.ResourceType
+import org.luxons.sevenwonders.model.resources.ResourceType
import java.lang.reflect.Type
internal class ResourceTypeSerializer : JsonSerializer<ResourceType>, JsonDeserializer<ResourceType> {
diff --git a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/data/serializers/ResourceTypesSerializer.kt b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/data/serializers/ResourceTypesSerializer.kt
index 8dc43af4..2383685c 100644
--- a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/data/serializers/ResourceTypesSerializer.kt
+++ b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/data/serializers/ResourceTypesSerializer.kt
@@ -1,4 +1,4 @@
-package org.luxons.sevenwonders.game.data.serializers
+package org.luxons.sevenwonders.engine.data.serializers
import com.google.gson.JsonDeserializationContext
import com.google.gson.JsonDeserializer
@@ -7,7 +7,7 @@ import com.google.gson.JsonParseException
import com.google.gson.JsonPrimitive
import com.google.gson.JsonSerializationContext
import com.google.gson.JsonSerializer
-import org.luxons.sevenwonders.game.api.resources.ResourceType
+import org.luxons.sevenwonders.model.resources.ResourceType
import java.lang.reflect.Type
internal class ResourceTypesSerializer : JsonSerializer<List<ResourceType>>, JsonDeserializer<List<ResourceType>> {
diff --git a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/data/serializers/ResourcesSerializer.kt b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/data/serializers/ResourcesSerializer.kt
index 0d9230d8..4226411d 100644
--- a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/data/serializers/ResourcesSerializer.kt
+++ b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/data/serializers/ResourcesSerializer.kt
@@ -1,4 +1,4 @@
-package org.luxons.sevenwonders.game.data.serializers
+package org.luxons.sevenwonders.engine.data.serializers
import com.google.gson.JsonDeserializationContext
import com.google.gson.JsonDeserializer
@@ -8,9 +8,9 @@ import com.google.gson.JsonParseException
import com.google.gson.JsonPrimitive
import com.google.gson.JsonSerializationContext
import com.google.gson.JsonSerializer
-import org.luxons.sevenwonders.game.api.resources.ResourceType
-import org.luxons.sevenwonders.game.resources.Resources
-import org.luxons.sevenwonders.game.resources.toResources
+import org.luxons.sevenwonders.engine.resources.Resources
+import org.luxons.sevenwonders.engine.resources.toResources
+import org.luxons.sevenwonders.model.resources.ResourceType
import java.lang.reflect.Type
internal class ResourcesSerializer : JsonSerializer<Resources>, JsonDeserializer<Resources> {
diff --git a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/data/serializers/ScienceProgressSerializer.kt b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/data/serializers/ScienceProgressSerializer.kt
index d6dc9ae3..bad74e54 100644
--- a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/data/serializers/ScienceProgressSerializer.kt
+++ b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/data/serializers/ScienceProgressSerializer.kt
@@ -1,4 +1,4 @@
-package org.luxons.sevenwonders.game.data.serializers
+package org.luxons.sevenwonders.engine.data.serializers
import com.google.gson.JsonDeserializationContext
import com.google.gson.JsonDeserializer
@@ -8,9 +8,9 @@ import com.google.gson.JsonParseException
import com.google.gson.JsonPrimitive
import com.google.gson.JsonSerializationContext
import com.google.gson.JsonSerializer
-import org.luxons.sevenwonders.game.boards.Science
-import org.luxons.sevenwonders.game.boards.ScienceType
-import org.luxons.sevenwonders.game.effects.ScienceProgress
+import org.luxons.sevenwonders.engine.boards.Science
+import org.luxons.sevenwonders.engine.boards.ScienceType
+import org.luxons.sevenwonders.engine.effects.ScienceProgress
import java.lang.reflect.Type
internal class ScienceProgressSerializer : JsonSerializer<ScienceProgress>, JsonDeserializer<ScienceProgress> {
diff --git a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/effects/BonusPerBoardElement.kt b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/effects/BonusPerBoardElement.kt
index f16c9f78..96d177c9 100644
--- a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/effects/BonusPerBoardElement.kt
+++ b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/effects/BonusPerBoardElement.kt
@@ -1,9 +1,9 @@
-package org.luxons.sevenwonders.game.effects
+package org.luxons.sevenwonders.engine.effects
-import org.luxons.sevenwonders.game.Player
-import org.luxons.sevenwonders.game.boards.Board
-import org.luxons.sevenwonders.game.api.boards.RelativeBoardPosition
-import org.luxons.sevenwonders.game.api.cards.Color
+import org.luxons.sevenwonders.engine.Player
+import org.luxons.sevenwonders.engine.boards.Board
+import org.luxons.sevenwonders.model.boards.RelativeBoardPosition
+import org.luxons.sevenwonders.model.cards.Color
enum class BoardElementType {
CARD,
diff --git a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/effects/Discount.kt b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/effects/Discount.kt
index 0809d279..28ffb49d 100644
--- a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/effects/Discount.kt
+++ b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/effects/Discount.kt
@@ -1,8 +1,8 @@
-package org.luxons.sevenwonders.game.effects
+package org.luxons.sevenwonders.engine.effects
-import org.luxons.sevenwonders.game.boards.Board
-import org.luxons.sevenwonders.game.api.resources.Provider
-import org.luxons.sevenwonders.game.api.resources.ResourceType
+import org.luxons.sevenwonders.engine.boards.Board
+import org.luxons.sevenwonders.model.resources.Provider
+import org.luxons.sevenwonders.model.resources.ResourceType
internal data class Discount(
val resourceTypes: List<ResourceType> = emptyList(),
diff --git a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/effects/Effect.kt b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/effects/Effect.kt
index 55744669..dcc86f8d 100644
--- a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/effects/Effect.kt
+++ b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/effects/Effect.kt
@@ -1,6 +1,6 @@
-package org.luxons.sevenwonders.game.effects
+package org.luxons.sevenwonders.engine.effects
-import org.luxons.sevenwonders.game.Player
+import org.luxons.sevenwonders.engine.Player
/**
* Represents an effect than can be applied to a player's board when playing a card or building his wonder. The effect
diff --git a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/effects/EndGameEffect.kt b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/effects/EndGameEffect.kt
index b4e7a683..635812d1 100644
--- a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/effects/EndGameEffect.kt
+++ b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/effects/EndGameEffect.kt
@@ -1,6 +1,6 @@
-package org.luxons.sevenwonders.game.effects
+package org.luxons.sevenwonders.engine.effects
-import org.luxons.sevenwonders.game.Player
+import org.luxons.sevenwonders.engine.Player
internal abstract class EndGameEffect : Effect {
diff --git a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/effects/GoldIncrease.kt b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/effects/GoldIncrease.kt
index f6e37841..b3ffc7f8 100644
--- a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/effects/GoldIncrease.kt
+++ b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/effects/GoldIncrease.kt
@@ -1,6 +1,6 @@
-package org.luxons.sevenwonders.game.effects
+package org.luxons.sevenwonders.engine.effects
-import org.luxons.sevenwonders.game.boards.Board
+import org.luxons.sevenwonders.engine.boards.Board
internal data class GoldIncrease(val amount: Int) : InstantOwnBoardEffect() {
diff --git a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/effects/InstantOwnBoardEffect.kt b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/effects/InstantOwnBoardEffect.kt
index 0b50656c..fd2fe080 100644
--- a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/effects/InstantOwnBoardEffect.kt
+++ b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/effects/InstantOwnBoardEffect.kt
@@ -1,7 +1,7 @@
-package org.luxons.sevenwonders.game.effects
+package org.luxons.sevenwonders.engine.effects
-import org.luxons.sevenwonders.game.Player
-import org.luxons.sevenwonders.game.boards.Board
+import org.luxons.sevenwonders.engine.Player
+import org.luxons.sevenwonders.engine.boards.Board
internal abstract class InstantOwnBoardEffect : Effect {
diff --git a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/effects/MilitaryReinforcements.kt b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/effects/MilitaryReinforcements.kt
index a168943c..0694c037 100644
--- a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/effects/MilitaryReinforcements.kt
+++ b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/effects/MilitaryReinforcements.kt
@@ -1,6 +1,6 @@
-package org.luxons.sevenwonders.game.effects
+package org.luxons.sevenwonders.engine.effects
-import org.luxons.sevenwonders.game.boards.Board
+import org.luxons.sevenwonders.engine.boards.Board
internal data class MilitaryReinforcements(val count: Int) : InstantOwnBoardEffect() {
diff --git a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/effects/ProductionIncrease.kt b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/effects/ProductionIncrease.kt
index 4bd4a27f..6458ad20 100644
--- a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/effects/ProductionIncrease.kt
+++ b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/effects/ProductionIncrease.kt
@@ -1,7 +1,7 @@
-package org.luxons.sevenwonders.game.effects
+package org.luxons.sevenwonders.engine.effects
-import org.luxons.sevenwonders.game.boards.Board
-import org.luxons.sevenwonders.game.resources.Production
+import org.luxons.sevenwonders.engine.boards.Board
+import org.luxons.sevenwonders.engine.resources.Production
internal data class ProductionIncrease(val production: Production, val isSellable: Boolean) : InstantOwnBoardEffect() {
diff --git a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/effects/RawPointsIncrease.kt b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/effects/RawPointsIncrease.kt
index a47686da..b4a97a84 100644
--- a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/effects/RawPointsIncrease.kt
+++ b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/effects/RawPointsIncrease.kt
@@ -1,6 +1,6 @@
-package org.luxons.sevenwonders.game.effects
+package org.luxons.sevenwonders.engine.effects
-import org.luxons.sevenwonders.game.Player
+import org.luxons.sevenwonders.engine.Player
internal data class RawPointsIncrease(val points: Int) : EndGameEffect() {
diff --git a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/effects/ScienceProgress.kt b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/effects/ScienceProgress.kt
index 462330db..4ea8626f 100644
--- a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/effects/ScienceProgress.kt
+++ b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/effects/ScienceProgress.kt
@@ -1,7 +1,7 @@
-package org.luxons.sevenwonders.game.effects
+package org.luxons.sevenwonders.engine.effects
-import org.luxons.sevenwonders.game.boards.Board
-import org.luxons.sevenwonders.game.boards.Science
+import org.luxons.sevenwonders.engine.boards.Board
+import org.luxons.sevenwonders.engine.boards.Science
internal class ScienceProgress(val science: Science) : InstantOwnBoardEffect() {
diff --git a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/effects/SpecialAbility.kt b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/effects/SpecialAbility.kt
index d271134f..857c7e63 100644
--- a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/effects/SpecialAbility.kt
+++ b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/effects/SpecialAbility.kt
@@ -1,7 +1,7 @@
-package org.luxons.sevenwonders.game.effects
+package org.luxons.sevenwonders.engine.effects
-import org.luxons.sevenwonders.game.Player
-import org.luxons.sevenwonders.game.boards.Board
+import org.luxons.sevenwonders.engine.Player
+import org.luxons.sevenwonders.engine.boards.Board
enum class SpecialAbility {
diff --git a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/effects/SpecialAbilityActivation.kt b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/effects/SpecialAbilityActivation.kt
index 66521679..6043c551 100644
--- a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/effects/SpecialAbilityActivation.kt
+++ b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/effects/SpecialAbilityActivation.kt
@@ -1,6 +1,6 @@
-package org.luxons.sevenwonders.game.effects
+package org.luxons.sevenwonders.engine.effects
-import org.luxons.sevenwonders.game.Player
+import org.luxons.sevenwonders.engine.Player
internal data class SpecialAbilityActivation(val specialAbility: SpecialAbility) : Effect {
diff --git a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/moves/BuildWonderMove.kt b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/moves/BuildWonderMove.kt
index c4508401..942d9db1 100644
--- a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/moves/BuildWonderMove.kt
+++ b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/moves/BuildWonderMove.kt
@@ -1,9 +1,9 @@
-package org.luxons.sevenwonders.game.moves
+package org.luxons.sevenwonders.engine.moves
-import org.luxons.sevenwonders.game.PlayerContext
-import org.luxons.sevenwonders.game.Settings
-import org.luxons.sevenwonders.game.api.PlayerMove
-import org.luxons.sevenwonders.game.cards.Card
+import org.luxons.sevenwonders.engine.PlayerContext
+import org.luxons.sevenwonders.engine.Settings
+import org.luxons.sevenwonders.engine.cards.Card
+import org.luxons.sevenwonders.model.PlayerMove
internal class BuildWonderMove(move: PlayerMove, card: Card, player: PlayerContext) :
CardFromHandMove(move, card, player) {
diff --git a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/moves/CardFromHandMove.kt b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/moves/CardFromHandMove.kt
index 17d612af..42db8040 100644
--- a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/moves/CardFromHandMove.kt
+++ b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/moves/CardFromHandMove.kt
@@ -1,8 +1,8 @@
-package org.luxons.sevenwonders.game.moves
+package org.luxons.sevenwonders.engine.moves
-import org.luxons.sevenwonders.game.PlayerContext
-import org.luxons.sevenwonders.game.api.PlayerMove
-import org.luxons.sevenwonders.game.cards.Card
+import org.luxons.sevenwonders.engine.PlayerContext
+import org.luxons.sevenwonders.engine.cards.Card
+import org.luxons.sevenwonders.model.PlayerMove
internal abstract class CardFromHandMove(move: PlayerMove, card: Card, player: PlayerContext) :
Move(move, card, player) {
diff --git a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/moves/CopyGuildMove.kt b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/moves/CopyGuildMove.kt
index b637eb6c..9cb57481 100644
--- a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/moves/CopyGuildMove.kt
+++ b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/moves/CopyGuildMove.kt
@@ -1,12 +1,12 @@
-package org.luxons.sevenwonders.game.moves
+package org.luxons.sevenwonders.engine.moves
-import org.luxons.sevenwonders.game.PlayerContext
-import org.luxons.sevenwonders.game.Settings
-import org.luxons.sevenwonders.game.api.PlayerMove
-import org.luxons.sevenwonders.game.api.boards.RelativeBoardPosition
-import org.luxons.sevenwonders.game.cards.Card
-import org.luxons.sevenwonders.game.api.cards.Color
-import org.luxons.sevenwonders.game.effects.SpecialAbility
+import org.luxons.sevenwonders.engine.PlayerContext
+import org.luxons.sevenwonders.engine.Settings
+import org.luxons.sevenwonders.engine.cards.Card
+import org.luxons.sevenwonders.engine.effects.SpecialAbility
+import org.luxons.sevenwonders.model.PlayerMove
+import org.luxons.sevenwonders.model.boards.RelativeBoardPosition
+import org.luxons.sevenwonders.model.cards.Color
internal class CopyGuildMove(move: PlayerMove, card: Card, player: PlayerContext) : Move(move, card, player) {
diff --git a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/moves/DiscardMove.kt b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/moves/DiscardMove.kt
index a8cd42a6..a8f2aebf 100644
--- a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/moves/DiscardMove.kt
+++ b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/moves/DiscardMove.kt
@@ -1,9 +1,9 @@
-package org.luxons.sevenwonders.game.moves
+package org.luxons.sevenwonders.engine.moves
-import org.luxons.sevenwonders.game.PlayerContext
-import org.luxons.sevenwonders.game.Settings
-import org.luxons.sevenwonders.game.api.PlayerMove
-import org.luxons.sevenwonders.game.cards.Card
+import org.luxons.sevenwonders.engine.PlayerContext
+import org.luxons.sevenwonders.engine.Settings
+import org.luxons.sevenwonders.engine.cards.Card
+import org.luxons.sevenwonders.model.PlayerMove
internal class DiscardMove(move: PlayerMove, card: Card, player: PlayerContext) :
CardFromHandMove(move, card, player) {
diff --git a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/moves/Move.kt b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/moves/Move.kt
index 134918d0..6ae92b9a 100644
--- a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/moves/Move.kt
+++ b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/moves/Move.kt
@@ -1,11 +1,11 @@
-package org.luxons.sevenwonders.game.moves
+package org.luxons.sevenwonders.engine.moves
-import org.luxons.sevenwonders.game.PlayerContext
-import org.luxons.sevenwonders.game.Settings
-import org.luxons.sevenwonders.game.api.PlayerMove
-import org.luxons.sevenwonders.game.api.MoveType
-import org.luxons.sevenwonders.game.cards.Card
-import org.luxons.sevenwonders.game.api.resources.ResourceTransactions
+import org.luxons.sevenwonders.engine.PlayerContext
+import org.luxons.sevenwonders.engine.Settings
+import org.luxons.sevenwonders.engine.cards.Card
+import org.luxons.sevenwonders.model.MoveType
+import org.luxons.sevenwonders.model.PlayerMove
+import org.luxons.sevenwonders.model.resources.ResourceTransactions
internal abstract class Move(
val move: PlayerMove,
diff --git a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/moves/PlayCardMove.kt b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/moves/PlayCardMove.kt
index 3596b164..17b1a48a 100644
--- a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/moves/PlayCardMove.kt
+++ b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/moves/PlayCardMove.kt
@@ -1,9 +1,9 @@
-package org.luxons.sevenwonders.game.moves
+package org.luxons.sevenwonders.engine.moves
-import org.luxons.sevenwonders.game.PlayerContext
-import org.luxons.sevenwonders.game.Settings
-import org.luxons.sevenwonders.game.api.PlayerMove
-import org.luxons.sevenwonders.game.cards.Card
+import org.luxons.sevenwonders.engine.PlayerContext
+import org.luxons.sevenwonders.engine.Settings
+import org.luxons.sevenwonders.engine.cards.Card
+import org.luxons.sevenwonders.model.PlayerMove
internal class PlayCardMove(move: PlayerMove, card: Card, player: PlayerContext) :
CardFromHandMove(move, card, player) {
diff --git a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/moves/PlayFreeCardMove.kt b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/moves/PlayFreeCardMove.kt
index bac185d9..310500c7 100644
--- a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/moves/PlayFreeCardMove.kt
+++ b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/moves/PlayFreeCardMove.kt
@@ -1,9 +1,9 @@
-package org.luxons.sevenwonders.game.moves
+package org.luxons.sevenwonders.engine.moves
-import org.luxons.sevenwonders.game.PlayerContext
-import org.luxons.sevenwonders.game.Settings
-import org.luxons.sevenwonders.game.api.PlayerMove
-import org.luxons.sevenwonders.game.cards.Card
+import org.luxons.sevenwonders.engine.PlayerContext
+import org.luxons.sevenwonders.engine.Settings
+import org.luxons.sevenwonders.engine.cards.Card
+import org.luxons.sevenwonders.model.PlayerMove
internal class PlayFreeCardMove(move: PlayerMove, card: Card, playerContext: PlayerContext) :
CardFromHandMove(move, card, playerContext) {
diff --git a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/resources/BestPriceCalculator.kt b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/resources/BestPriceCalculator.kt
index e4d4c6c4..4f2ccd07 100644
--- a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/resources/BestPriceCalculator.kt
+++ b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/resources/BestPriceCalculator.kt
@@ -1,9 +1,9 @@
-package org.luxons.sevenwonders.game.resources
+package org.luxons.sevenwonders.engine.resources
-import org.luxons.sevenwonders.game.Player
-import org.luxons.sevenwonders.game.api.resources.Provider
-import org.luxons.sevenwonders.game.api.resources.ResourceTransactions
-import org.luxons.sevenwonders.game.api.resources.ResourceType
+import org.luxons.sevenwonders.engine.Player
+import org.luxons.sevenwonders.model.resources.Provider
+import org.luxons.sevenwonders.model.resources.ResourceTransactions
+import org.luxons.sevenwonders.model.resources.ResourceType
import java.util.EnumSet
internal fun bestSolution(resources: Resources, player: Player): TransactionPlan =
diff --git a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/resources/Production.kt b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/resources/Production.kt
index f3c71e2a..88203144 100644
--- a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/resources/Production.kt
+++ b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/resources/Production.kt
@@ -1,6 +1,6 @@
-package org.luxons.sevenwonders.game.resources
+package org.luxons.sevenwonders.engine.resources
-import org.luxons.sevenwonders.game.api.resources.ResourceType
+import org.luxons.sevenwonders.model.resources.ResourceType
import java.util.EnumSet
data class Production internal constructor(
diff --git a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/resources/ResourceTransactions.kt b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/resources/ResourceTransactions.kt
index a7554768..be9b9e76 100644
--- a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/resources/ResourceTransactions.kt
+++ b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/resources/ResourceTransactions.kt
@@ -1,11 +1,11 @@
-package org.luxons.sevenwonders.game.resources
-
-import org.luxons.sevenwonders.game.Player
-import org.luxons.sevenwonders.game.api.resources.CountedResource
-import org.luxons.sevenwonders.game.api.resources.Provider
-import org.luxons.sevenwonders.game.api.resources.ResourceTransaction
-import org.luxons.sevenwonders.game.api.resources.ResourceTransactions
-import org.luxons.sevenwonders.game.api.toCountedResourcesList
+package org.luxons.sevenwonders.engine.resources
+
+import org.luxons.sevenwonders.engine.Player
+import org.luxons.sevenwonders.engine.converters.toCountedResourcesList
+import org.luxons.sevenwonders.model.resources.CountedResource
+import org.luxons.sevenwonders.model.resources.Provider
+import org.luxons.sevenwonders.model.resources.ResourceTransaction
+import org.luxons.sevenwonders.model.resources.ResourceTransactions
fun Map<Provider, Resources>.toTransactions(): ResourceTransactions =
filterValues { !it.isEmpty() }
diff --git a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/resources/Resources.kt b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/resources/Resources.kt
index bc893062..0edf9588 100644
--- a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/resources/Resources.kt
+++ b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/resources/Resources.kt
@@ -1,6 +1,6 @@
-package org.luxons.sevenwonders.game.resources
+package org.luxons.sevenwonders.engine.resources
-import org.luxons.sevenwonders.game.api.resources.ResourceType
+import org.luxons.sevenwonders.model.resources.ResourceType
fun emptyResources(): Resources = MutableResources()
diff --git a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/resources/TradingRules.kt b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/resources/TradingRules.kt
index c516f4b1..e0686d9c 100644
--- a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/resources/TradingRules.kt
+++ b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/resources/TradingRules.kt
@@ -1,9 +1,9 @@
-package org.luxons.sevenwonders.game.resources
+package org.luxons.sevenwonders.engine.resources
-import org.luxons.sevenwonders.game.api.resources.Provider
-import org.luxons.sevenwonders.game.api.resources.ResourceTransaction
-import org.luxons.sevenwonders.game.api.resources.ResourceTransactions
-import org.luxons.sevenwonders.game.api.resources.ResourceType
+import org.luxons.sevenwonders.model.resources.Provider
+import org.luxons.sevenwonders.model.resources.ResourceTransaction
+import org.luxons.sevenwonders.model.resources.ResourceTransactions
+import org.luxons.sevenwonders.model.resources.ResourceType
class TradingRules internal constructor(private val defaultCost: Int) {
diff --git a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/score/Score.kt b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/score/Score.kt
index c1d34d5d..4da27a59 100644
--- a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/score/Score.kt
+++ b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/score/Score.kt
@@ -1,4 +1,4 @@
-package org.luxons.sevenwonders.game.score
+package org.luxons.sevenwonders.engine.score
class ScoreBoard(scores: Collection<PlayerScore>) {
diff --git a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/wonders/Wonder.kt b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/wonders/Wonder.kt
index 49ce9a67..2fd369ee 100644
--- a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/wonders/Wonder.kt
+++ b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/wonders/Wonder.kt
@@ -1,13 +1,13 @@
-package org.luxons.sevenwonders.game.wonders
+package org.luxons.sevenwonders.engine.wonders
-import org.luxons.sevenwonders.game.Player
-import org.luxons.sevenwonders.game.boards.Board
-import org.luxons.sevenwonders.game.api.cards.CardBack
-import org.luxons.sevenwonders.game.api.cards.PlayabilityLevel
-import org.luxons.sevenwonders.game.cards.RequirementsSatisfaction
-import org.luxons.sevenwonders.game.api.resources.ResourceTransactions
-import org.luxons.sevenwonders.game.api.resources.ResourceType
-import org.luxons.sevenwonders.game.api.wonders.WonderBuildability
+import org.luxons.sevenwonders.engine.Player
+import org.luxons.sevenwonders.engine.boards.Board
+import org.luxons.sevenwonders.engine.cards.RequirementsSatisfaction
+import org.luxons.sevenwonders.model.cards.CardBack
+import org.luxons.sevenwonders.model.cards.PlayabilityLevel
+import org.luxons.sevenwonders.model.resources.ResourceTransactions
+import org.luxons.sevenwonders.model.resources.ResourceType
+import org.luxons.sevenwonders.model.wonders.WonderBuildability
internal class Wonder(
val name: String,
@@ -51,7 +51,8 @@ internal class Wonder(
private object Buildability {
fun alreadyBuilt() = WonderBuildability(
- isBuildable = false, playabilityLevel = PlayabilityLevel.INCOMPATIBLE_WITH_BOARD
+ isBuildable = false,
+ playabilityLevel = PlayabilityLevel.INCOMPATIBLE_WITH_BOARD
)
internal fun requirementDependent(satisfaction: RequirementsSatisfaction) =
diff --git a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/wonders/WonderStage.kt b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/wonders/WonderStage.kt
index cb2bf386..974c6a7a 100644
--- a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/game/wonders/WonderStage.kt
+++ b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/wonders/WonderStage.kt
@@ -1,11 +1,11 @@
-package org.luxons.sevenwonders.game.wonders
+package org.luxons.sevenwonders.engine.wonders
-import org.luxons.sevenwonders.game.Player
-import org.luxons.sevenwonders.game.boards.Board
-import org.luxons.sevenwonders.game.api.cards.CardBack
-import org.luxons.sevenwonders.game.cards.Requirements
-import org.luxons.sevenwonders.game.effects.Effect
-import org.luxons.sevenwonders.game.api.resources.ResourceTransactions
+import org.luxons.sevenwonders.engine.Player
+import org.luxons.sevenwonders.engine.boards.Board
+import org.luxons.sevenwonders.engine.cards.Requirements
+import org.luxons.sevenwonders.engine.effects.Effect
+import org.luxons.sevenwonders.model.cards.CardBack
+import org.luxons.sevenwonders.model.resources.ResourceTransactions
internal class WonderStage(
val requirements: Requirements,
bgstack15