diff options
author | Joffrey BION <joffrey.bion@gmail.com> | 2019-05-22 02:40:48 +0200 |
---|---|---|
committer | Joffrey BION <joffrey.bion@gmail.com> | 2019-05-22 02:40:48 +0200 |
commit | 157edc9b8027f63998758d3c91cbaa1053550f0f (patch) | |
tree | 3c5b1b6b4c3c33f1493d6ef2a5ec71a796b24603 /sw-engine/src | |
parent | Reorder subprojects in settings.gradle to make more sense (diff) | |
download | seven-wonders-157edc9b8027f63998758d3c91cbaa1053550f0f.tar.gz seven-wonders-157edc9b8027f63998758d3c91cbaa1053550f0f.tar.bz2 seven-wonders-157edc9b8027f63998758d3c91cbaa1053550f0f.zip |
Reorganize packages again
Diffstat (limited to 'sw-engine/src')
-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 | ||||
-rw-r--r-- | sw-engine/src/main/resources/org/luxons/sevenwonders/engine/data/cards.json (renamed from sw-engine/src/main/resources/org/luxons/sevenwonders/game/data/cards.json) | 0 | ||||
-rw-r--r-- | sw-engine/src/main/resources/org/luxons/sevenwonders/engine/data/global_rules.json (renamed from sw-engine/src/main/resources/org/luxons/sevenwonders/game/data/global_rules.json) | 0 | ||||
-rw-r--r-- | sw-engine/src/main/resources/org/luxons/sevenwonders/engine/data/wonders.json (renamed from sw-engine/src/main/resources/org/luxons/sevenwonders/game/data/wonders.json) | 0 | ||||
-rw-r--r-- | sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/GameTest.kt (renamed from sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/GameTest.kt) | 38 | ||||
-rw-r--r-- | sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/boards/BoardTest.kt (renamed from sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/boards/BoardTest.kt) | 34 | ||||
-rw-r--r-- | sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/boards/MilitaryTest.kt (renamed from sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/boards/MilitaryTest.kt) | 4 | ||||
-rw-r--r-- | sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/boards/RelativeBoardPositionTest.kt (renamed from sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/boards/RelativeBoardPositionTest.kt) | 4 | ||||
-rw-r--r-- | sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/boards/ScienceTest.kt (renamed from sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/boards/ScienceTest.kt) | 4 | ||||
-rw-r--r-- | sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/cards/CardBackTest.kt (renamed from sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/cards/CardBackTest.kt) | 4 | ||||
-rw-r--r-- | sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/cards/CardTest.kt (renamed from sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/cards/CardTest.kt) | 24 | ||||
-rw-r--r-- | sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/cards/DecksTest.kt (renamed from sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/cards/DecksTest.kt) | 6 | ||||
-rw-r--r-- | sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/cards/HandRotationDirectionTest.kt (renamed from sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/cards/HandRotationDirectionTest.kt) | 4 | ||||
-rw-r--r-- | sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/cards/HandsTest.kt (renamed from sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/cards/HandsTest.kt) | 10 | ||||
-rw-r--r-- | sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/cards/RequirementsTest.kt (renamed from sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/cards/RequirementsTest.kt) | 22 | ||||
-rw-r--r-- | sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/data/GameDefinitionTest.kt (renamed from sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/data/GameDefinitionTest.kt) | 4 | ||||
-rw-r--r-- | sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/data/serializers/NumericEffectSerializerTest.kt (renamed from sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/data/serializers/NumericEffectSerializerTest.kt) | 12 | ||||
-rw-r--r-- | sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/data/serializers/ProductionIncreaseSerializerTest.kt (renamed from sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/data/serializers/ProductionIncreaseSerializerTest.kt) | 12 | ||||
-rw-r--r-- | sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/data/serializers/ProductionSerializerTest.kt (renamed from sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/data/serializers/ProductionSerializerTest.kt) | 10 | ||||
-rw-r--r-- | sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/data/serializers/ResourceTypeSerializerTest.kt (renamed from sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/data/serializers/ResourceTypeSerializerTest.kt) | 4 | ||||
-rw-r--r-- | sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/data/serializers/ResourceTypesSerializerTest.kt (renamed from sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/data/serializers/ResourceTypesSerializerTest.kt) | 4 | ||||
-rw-r--r-- | sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/data/serializers/ResourcesSerializerTest.kt (renamed from sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/data/serializers/ResourcesSerializerTest.kt) | 16 | ||||
-rw-r--r-- | sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/data/serializers/ScienceProgressSerializerTest.kt (renamed from sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/data/serializers/ScienceProgressSerializerTest.kt) | 8 | ||||
-rw-r--r-- | sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/effects/BonusPerBoardElementTest.kt (renamed from sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/effects/BonusPerBoardElementTest.kt) | 18 | ||||
-rw-r--r-- | sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/effects/DiscountTest.kt (renamed from sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/effects/DiscountTest.kt) | 10 | ||||
-rw-r--r-- | sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/effects/GoldIncreaseTest.kt (renamed from sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/effects/GoldIncreaseTest.kt) | 10 | ||||
-rw-r--r-- | sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/effects/MilitaryReinforcementsTest.kt (renamed from sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/effects/MilitaryReinforcementsTest.kt) | 10 | ||||
-rw-r--r-- | sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/effects/ProductionIncreaseTest.kt (renamed from sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/effects/ProductionIncreaseTest.kt) | 14 | ||||
-rw-r--r-- | sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/effects/RawPointsIncreaseTest.kt (renamed from sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/effects/RawPointsIncreaseTest.kt) | 6 | ||||
-rw-r--r-- | sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/effects/ScienceProgressTest.kt (renamed from sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/effects/ScienceProgressTest.kt) | 12 | ||||
-rw-r--r-- | sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/effects/SpecialAbilityActivationTest.kt (renamed from sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/effects/SpecialAbilityActivationTest.kt) | 14 | ||||
-rw-r--r-- | sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/moves/BuildWonderMoveTest.kt (renamed from sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/moves/BuildWonderMoveTest.kt) | 22 | ||||
-rw-r--r-- | sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/resources/BestPriceCalculatorTest.kt (renamed from sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/resources/BestPriceCalculatorTest.kt) | 32 | ||||
-rw-r--r-- | sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/resources/ProductionTest.kt (renamed from sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/resources/ProductionTest.kt) | 18 | ||||
-rw-r--r-- | sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/resources/ResourceTransactionsTest.kt (renamed from sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/resources/ResourceTransactionsTest.kt) | 12 | ||||
-rw-r--r-- | sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/resources/ResourcesTest.kt (renamed from sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/resources/ResourcesTest.kt) | 18 | ||||
-rw-r--r-- | sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/resources/TradingRulesTest.kt (renamed from sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/resources/TradingRulesTest.kt) | 12 | ||||
-rw-r--r-- | sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/test/TestUtils.kt (renamed from sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/test/TestUtils.kt) | 65 | ||||
-rw-r--r-- | sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/wonders/WonderTest.kt (renamed from sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/wonders/WonderTest.kt) | 6 | ||||
-rw-r--r-- | sw-engine/src/test/kotlin/org/luxons/sevenwonders/model/BoardsKtTest.kt (renamed from sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/api/BoardsKtTest.kt) | 12 | ||||
-rw-r--r-- | sw-engine/src/test/kotlin/org/luxons/sevenwonders/model/TableTest.kt (renamed from sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/api/TableTest.kt) | 8 |
94 files changed, 589 insertions, 570 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, diff --git a/sw-engine/src/main/resources/org/luxons/sevenwonders/game/data/cards.json b/sw-engine/src/main/resources/org/luxons/sevenwonders/engine/data/cards.json index bd2d5893..bd2d5893 100644 --- a/sw-engine/src/main/resources/org/luxons/sevenwonders/game/data/cards.json +++ b/sw-engine/src/main/resources/org/luxons/sevenwonders/engine/data/cards.json diff --git a/sw-engine/src/main/resources/org/luxons/sevenwonders/game/data/global_rules.json b/sw-engine/src/main/resources/org/luxons/sevenwonders/engine/data/global_rules.json index 9b486fe6..9b486fe6 100644 --- a/sw-engine/src/main/resources/org/luxons/sevenwonders/game/data/global_rules.json +++ b/sw-engine/src/main/resources/org/luxons/sevenwonders/engine/data/global_rules.json diff --git a/sw-engine/src/main/resources/org/luxons/sevenwonders/game/data/wonders.json b/sw-engine/src/main/resources/org/luxons/sevenwonders/engine/data/wonders.json index fc3ac69d..fc3ac69d 100644 --- a/sw-engine/src/main/resources/org/luxons/sevenwonders/game/data/wonders.json +++ b/sw-engine/src/main/resources/org/luxons/sevenwonders/engine/data/wonders.json diff --git a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/GameTest.kt b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/GameTest.kt index a3b5cf62..935d66e5 100644 --- a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/GameTest.kt +++ b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/GameTest.kt @@ -1,17 +1,17 @@ -package org.luxons.sevenwonders.game - -import org.luxons.sevenwonders.game.api.Action -import org.luxons.sevenwonders.game.api.PlayedMove -import org.luxons.sevenwonders.game.api.PlayerMove -import org.luxons.sevenwonders.game.api.PlayerTurnInfo -import org.luxons.sevenwonders.game.api.cards.HandCard -import org.luxons.sevenwonders.game.api.cards.TableCard -import org.luxons.sevenwonders.game.data.GameDefinition -import org.luxons.sevenwonders.game.data.LAST_AGE -import org.luxons.sevenwonders.game.api.MoveType -import org.luxons.sevenwonders.game.api.resources.ResourceTransactions -import org.luxons.sevenwonders.game.api.resources.noTransactions -import org.luxons.sevenwonders.game.test.testCustomizableSettings +package org.luxons.sevenwonders.engine + +import org.luxons.sevenwonders.model.Action +import org.luxons.sevenwonders.model.PlayedMove +import org.luxons.sevenwonders.model.PlayerMove +import org.luxons.sevenwonders.model.PlayerTurnInfo +import org.luxons.sevenwonders.model.cards.HandCard +import org.luxons.sevenwonders.model.cards.TableCard +import org.luxons.sevenwonders.engine.data.GameDefinition +import org.luxons.sevenwonders.engine.data.LAST_AGE +import org.luxons.sevenwonders.model.MoveType +import org.luxons.sevenwonders.model.resources.ResourceTransactions +import org.luxons.sevenwonders.model.resources.noTransactions +import org.luxons.sevenwonders.engine.test.testCustomizableSettings import kotlin.test.Test import kotlin.test.assertEquals import kotlin.test.assertFalse @@ -93,8 +93,14 @@ class GameTest { assertFalse(neighbourGuilds.isEmpty()) return MoveExpectation( turnInfo.playerIndex, - PlayerMove(MoveType.COPY_GUILD, neighbourGuilds.first().name), - PlayedMove(turnInfo.playerIndex, MoveType.COPY_GUILD, neighbourGuilds.first(), + PlayerMove( + MoveType.COPY_GUILD, + neighbourGuilds.first().name + ), + PlayedMove( + turnInfo.playerIndex, + MoveType.COPY_GUILD, + neighbourGuilds.first(), noTransactions() ) ) diff --git a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/boards/BoardTest.kt b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/boards/BoardTest.kt index 669934aa..0b514e5f 100644 --- a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/boards/BoardTest.kt +++ b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/boards/BoardTest.kt @@ -1,4 +1,4 @@ -package org.luxons.sevenwonders.game.boards +package org.luxons.sevenwonders.engine.boards import junit.framework.TestCase.assertEquals import org.junit.Assume.assumeTrue @@ -8,22 +8,22 @@ import org.junit.experimental.theories.FromDataPoints import org.junit.experimental.theories.Theories import org.junit.experimental.theories.Theory import org.junit.runner.RunWith -import org.luxons.sevenwonders.game.boards.Board.InsufficientFundsException -import org.luxons.sevenwonders.game.api.cards.Color -import org.luxons.sevenwonders.game.effects.RawPointsIncrease -import org.luxons.sevenwonders.game.effects.SpecialAbility -import org.luxons.sevenwonders.game.effects.SpecialAbilityActivation -import org.luxons.sevenwonders.game.api.resources.ResourceType -import org.luxons.sevenwonders.game.resources.resourcesOf -import org.luxons.sevenwonders.game.score.ScoreCategory -import org.luxons.sevenwonders.game.test.addCards -import org.luxons.sevenwonders.game.test.getDifferentColorFrom -import org.luxons.sevenwonders.game.test.playCardWithEffect -import org.luxons.sevenwonders.game.test.singleBoardPlayer -import org.luxons.sevenwonders.game.test.testBoard -import org.luxons.sevenwonders.game.test.testCard -import org.luxons.sevenwonders.game.test.testSettings -import org.luxons.sevenwonders.game.test.testWonder +import org.luxons.sevenwonders.engine.boards.Board.InsufficientFundsException +import org.luxons.sevenwonders.model.cards.Color +import org.luxons.sevenwonders.engine.effects.RawPointsIncrease +import org.luxons.sevenwonders.engine.effects.SpecialAbility +import org.luxons.sevenwonders.engine.effects.SpecialAbilityActivation +import org.luxons.sevenwonders.model.resources.ResourceType +import org.luxons.sevenwonders.engine.resources.resourcesOf +import org.luxons.sevenwonders.engine.score.ScoreCategory +import org.luxons.sevenwonders.engine.test.addCards +import org.luxons.sevenwonders.engine.test.getDifferentColorFrom +import org.luxons.sevenwonders.engine.test.playCardWithEffect +import org.luxons.sevenwonders.engine.test.singleBoardPlayer +import org.luxons.sevenwonders.engine.test.testBoard +import org.luxons.sevenwonders.engine.test.testCard +import org.luxons.sevenwonders.engine.test.testSettings +import org.luxons.sevenwonders.engine.test.testWonder import kotlin.test.assertFailsWith import kotlin.test.assertFalse import kotlin.test.assertSame diff --git a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/boards/MilitaryTest.kt b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/boards/MilitaryTest.kt index 248d43dd..509d8670 100644 --- a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/boards/MilitaryTest.kt +++ b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/boards/MilitaryTest.kt @@ -1,11 +1,11 @@ -package org.luxons.sevenwonders.game.boards +package org.luxons.sevenwonders.engine.boards import org.junit.experimental.theories.DataPoints import org.junit.experimental.theories.FromDataPoints import org.junit.experimental.theories.Theories import org.junit.experimental.theories.Theory import org.junit.runner.RunWith -import org.luxons.sevenwonders.game.boards.Military.UnknownAgeException +import org.luxons.sevenwonders.engine.boards.Military.UnknownAgeException import kotlin.test.assertEquals import kotlin.test.assertFailsWith diff --git a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/boards/RelativeBoardPositionTest.kt b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/boards/RelativeBoardPositionTest.kt index 75743b86..2c6aa9ad 100644 --- a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/boards/RelativeBoardPositionTest.kt +++ b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/boards/RelativeBoardPositionTest.kt @@ -1,11 +1,11 @@ -package org.luxons.sevenwonders.game.boards +package org.luxons.sevenwonders.engine.boards import org.junit.Assume.assumeTrue import org.junit.experimental.theories.DataPoints import org.junit.experimental.theories.Theories import org.junit.experimental.theories.Theory import org.junit.runner.RunWith -import org.luxons.sevenwonders.game.api.boards.RelativeBoardPosition +import org.luxons.sevenwonders.model.boards.RelativeBoardPosition import kotlin.test.assertEquals @RunWith(Theories::class) diff --git a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/boards/ScienceTest.kt b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/boards/ScienceTest.kt index 80d6773d..e3f6f47d 100644 --- a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/boards/ScienceTest.kt +++ b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/boards/ScienceTest.kt @@ -1,11 +1,11 @@ -package org.luxons.sevenwonders.game.boards +package org.luxons.sevenwonders.engine.boards import org.junit.Test import org.junit.experimental.theories.DataPoints import org.junit.experimental.theories.Theories import org.junit.experimental.theories.Theory import org.junit.runner.RunWith -import org.luxons.sevenwonders.game.test.createScience +import org.luxons.sevenwonders.engine.test.createScience import kotlin.test.assertEquals @RunWith(Theories::class) diff --git a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/cards/CardBackTest.kt b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/cards/CardBackTest.kt index 967735b8..44bdc10d 100644 --- a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/cards/CardBackTest.kt +++ b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/cards/CardBackTest.kt @@ -1,7 +1,7 @@ -package org.luxons.sevenwonders.game.cards +package org.luxons.sevenwonders.engine.cards import org.junit.Test -import org.luxons.sevenwonders.game.api.cards.CardBack +import org.luxons.sevenwonders.model.cards.CardBack import kotlin.test.assertEquals class CardBackTest { diff --git a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/cards/CardTest.kt b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/cards/CardTest.kt index 56fc9725..8fd673b2 100644 --- a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/cards/CardTest.kt +++ b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/cards/CardTest.kt @@ -1,17 +1,17 @@ -package org.luxons.sevenwonders.game.cards +package org.luxons.sevenwonders.engine.cards import org.junit.Test -import org.luxons.sevenwonders.game.SimplePlayer -import org.luxons.sevenwonders.game.api.cards.Color -import org.luxons.sevenwonders.game.boards.Board -import org.luxons.sevenwonders.game.boards.Table -import org.luxons.sevenwonders.game.effects.ProductionIncrease -import org.luxons.sevenwonders.game.resources.Production -import org.luxons.sevenwonders.game.api.resources.ResourceType -import org.luxons.sevenwonders.game.api.resources.noTransactions -import org.luxons.sevenwonders.game.test.testCard -import org.luxons.sevenwonders.game.test.testSettings -import org.luxons.sevenwonders.game.wonders.Wonder +import org.luxons.sevenwonders.engine.SimplePlayer +import org.luxons.sevenwonders.model.cards.Color +import org.luxons.sevenwonders.engine.boards.Board +import org.luxons.sevenwonders.engine.boards.Table +import org.luxons.sevenwonders.engine.effects.ProductionIncrease +import org.luxons.sevenwonders.engine.resources.Production +import org.luxons.sevenwonders.model.resources.ResourceType +import org.luxons.sevenwonders.model.resources.noTransactions +import org.luxons.sevenwonders.engine.test.testCard +import org.luxons.sevenwonders.engine.test.testSettings +import org.luxons.sevenwonders.engine.wonders.Wonder import kotlin.test.assertEquals class CardTest { diff --git a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/cards/DecksTest.kt b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/cards/DecksTest.kt index f6c45720..bd2615cd 100644 --- a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/cards/DecksTest.kt +++ b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/cards/DecksTest.kt @@ -1,4 +1,4 @@ -package org.luxons.sevenwonders.game.cards +package org.luxons.sevenwonders.engine.cards import org.junit.Assume.assumeTrue import org.junit.Test @@ -6,8 +6,8 @@ import org.junit.experimental.theories.DataPoints import org.junit.experimental.theories.Theories import org.junit.experimental.theories.Theory import org.junit.runner.RunWith -import org.luxons.sevenwonders.game.cards.Decks.CardNotFoundException -import org.luxons.sevenwonders.game.test.sampleCards +import org.luxons.sevenwonders.engine.cards.Decks.CardNotFoundException +import org.luxons.sevenwonders.engine.test.sampleCards import kotlin.test.assertEquals import kotlin.test.assertFailsWith import kotlin.test.assertNotNull diff --git a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/cards/HandRotationDirectionTest.kt b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/cards/HandRotationDirectionTest.kt index 2fbaf8ed..aa681c9c 100644 --- a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/cards/HandRotationDirectionTest.kt +++ b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/cards/HandRotationDirectionTest.kt @@ -1,7 +1,7 @@ -package org.luxons.sevenwonders.game.cards +package org.luxons.sevenwonders.engine.cards import org.junit.Test -import org.luxons.sevenwonders.game.api.cards.HandRotationDirection +import org.luxons.sevenwonders.model.cards.HandRotationDirection import kotlin.test.assertEquals class HandRotationDirectionTest { diff --git a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/cards/HandsTest.kt b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/cards/HandsTest.kt index 4c9f258c..b8491434 100644 --- a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/cards/HandsTest.kt +++ b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/cards/HandsTest.kt @@ -1,4 +1,4 @@ -package org.luxons.sevenwonders.game.cards +package org.luxons.sevenwonders.engine.cards import org.junit.Assume.assumeTrue import org.junit.Test @@ -7,10 +7,10 @@ import org.junit.experimental.theories.FromDataPoints import org.junit.experimental.theories.Theories import org.junit.experimental.theories.Theory import org.junit.runner.RunWith -import org.luxons.sevenwonders.game.SimplePlayer -import org.luxons.sevenwonders.game.api.cards.HandRotationDirection -import org.luxons.sevenwonders.game.test.sampleCards -import org.luxons.sevenwonders.game.test.testTable +import org.luxons.sevenwonders.engine.SimplePlayer +import org.luxons.sevenwonders.model.cards.HandRotationDirection +import org.luxons.sevenwonders.engine.test.sampleCards +import org.luxons.sevenwonders.engine.test.testTable import kotlin.test.assertEquals import kotlin.test.assertFailsWith import kotlin.test.assertFalse diff --git a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/cards/RequirementsTest.kt b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/cards/RequirementsTest.kt index 4bed43b3..da0ae124 100644 --- a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/cards/RequirementsTest.kt +++ b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/cards/RequirementsTest.kt @@ -1,4 +1,4 @@ -package org.luxons.sevenwonders.game.cards +package org.luxons.sevenwonders.engine.cards import org.junit.Assume.assumeTrue import org.junit.Test @@ -6,16 +6,16 @@ import org.junit.experimental.theories.DataPoints import org.junit.experimental.theories.Theories import org.junit.experimental.theories.Theory import org.junit.runner.RunWith -import org.luxons.sevenwonders.game.SimplePlayer -import org.luxons.sevenwonders.game.boards.Table -import org.luxons.sevenwonders.game.api.resources.Provider -import org.luxons.sevenwonders.game.api.resources.ResourceType -import org.luxons.sevenwonders.game.resources.emptyResources -import org.luxons.sevenwonders.game.api.resources.noTransactions -import org.luxons.sevenwonders.game.test.createRequirements -import org.luxons.sevenwonders.game.test.createTransactions -import org.luxons.sevenwonders.game.test.singleBoardPlayer -import org.luxons.sevenwonders.game.test.testBoard +import org.luxons.sevenwonders.engine.SimplePlayer +import org.luxons.sevenwonders.engine.boards.Table +import org.luxons.sevenwonders.model.resources.Provider +import org.luxons.sevenwonders.model.resources.ResourceType +import org.luxons.sevenwonders.engine.resources.emptyResources +import org.luxons.sevenwonders.model.resources.noTransactions +import org.luxons.sevenwonders.engine.test.createRequirements +import org.luxons.sevenwonders.engine.test.createTransactions +import org.luxons.sevenwonders.engine.test.singleBoardPlayer +import org.luxons.sevenwonders.engine.test.testBoard import kotlin.test.assertEquals import kotlin.test.assertSame import kotlin.test.assertTrue diff --git a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/data/GameDefinitionTest.kt b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/data/GameDefinitionTest.kt index 4317a933..b9b7bb3c 100644 --- a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/data/GameDefinitionTest.kt +++ b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/data/GameDefinitionTest.kt @@ -1,7 +1,7 @@ -package org.luxons.sevenwonders.game.data +package org.luxons.sevenwonders.engine.data import org.junit.Test -import org.luxons.sevenwonders.game.api.CustomizableSettings +import org.luxons.sevenwonders.model.CustomizableSettings import kotlin.test.assertEquals import kotlin.test.assertNotNull diff --git a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/data/serializers/NumericEffectSerializerTest.kt b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/data/serializers/NumericEffectSerializerTest.kt index 9b44fad2..6a399977 100644 --- a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/data/serializers/NumericEffectSerializerTest.kt +++ b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/data/serializers/NumericEffectSerializerTest.kt @@ -1,4 +1,4 @@ -package org.luxons.sevenwonders.game.data.serializers +package org.luxons.sevenwonders.engine.data.serializers import com.github.salomonbrys.kotson.fromJson import com.google.gson.Gson @@ -9,11 +9,11 @@ import org.junit.experimental.theories.DataPoints import org.junit.experimental.theories.Theories import org.junit.experimental.theories.Theory import org.junit.runner.RunWith -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.resources.Production +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.resources.Production import kotlin.test.assertEquals import kotlin.test.assertFailsWith diff --git a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/data/serializers/ProductionIncreaseSerializerTest.kt b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/data/serializers/ProductionIncreaseSerializerTest.kt index 5ea60d5d..709f2a87 100644 --- a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/data/serializers/ProductionIncreaseSerializerTest.kt +++ b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/data/serializers/ProductionIncreaseSerializerTest.kt @@ -1,4 +1,4 @@ -package org.luxons.sevenwonders.game.data.serializers +package org.luxons.sevenwonders.engine.data.serializers import com.github.salomonbrys.kotson.fromJson import com.google.gson.Gson @@ -6,11 +6,11 @@ import com.google.gson.GsonBuilder import com.google.gson.reflect.TypeToken import org.junit.Before import org.junit.Test -import org.luxons.sevenwonders.game.effects.ProductionIncrease -import org.luxons.sevenwonders.game.resources.MutableResources -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.effects.ProductionIncrease +import org.luxons.sevenwonders.engine.resources.MutableResources +import org.luxons.sevenwonders.engine.resources.Production +import org.luxons.sevenwonders.model.resources.ResourceType +import org.luxons.sevenwonders.engine.resources.Resources import kotlin.test.assertEquals import kotlin.test.assertFailsWith import kotlin.test.assertNull diff --git a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/data/serializers/ProductionSerializerTest.kt b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/data/serializers/ProductionSerializerTest.kt index 4fbd8373..4af1d900 100644 --- a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/data/serializers/ProductionSerializerTest.kt +++ b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/data/serializers/ProductionSerializerTest.kt @@ -1,4 +1,4 @@ -package org.luxons.sevenwonders.game.data.serializers +package org.luxons.sevenwonders.engine.data.serializers import com.github.salomonbrys.kotson.fromJson import com.google.gson.Gson @@ -6,10 +6,10 @@ import com.google.gson.GsonBuilder import com.google.gson.reflect.TypeToken import org.junit.Before import org.junit.Test -import org.luxons.sevenwonders.game.resources.MutableResources -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.MutableResources +import org.luxons.sevenwonders.engine.resources.Production +import org.luxons.sevenwonders.model.resources.ResourceType +import org.luxons.sevenwonders.engine.resources.Resources import kotlin.test.assertEquals import kotlin.test.assertFailsWith import kotlin.test.assertNull diff --git a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/data/serializers/ResourceTypeSerializerTest.kt b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/data/serializers/ResourceTypeSerializerTest.kt index c5e7b53d..e256efc3 100644 --- a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/data/serializers/ResourceTypeSerializerTest.kt +++ b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/data/serializers/ResourceTypeSerializerTest.kt @@ -1,11 +1,11 @@ -package org.luxons.sevenwonders.game.data.serializers +package org.luxons.sevenwonders.engine.data.serializers import com.github.salomonbrys.kotson.fromJson import com.google.gson.Gson import com.google.gson.GsonBuilder import org.junit.Before import org.junit.Test -import org.luxons.sevenwonders.game.api.resources.ResourceType +import org.luxons.sevenwonders.model.resources.ResourceType import kotlin.test.assertEquals import kotlin.test.assertFailsWith import kotlin.test.assertNull diff --git a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/data/serializers/ResourceTypesSerializerTest.kt b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/data/serializers/ResourceTypesSerializerTest.kt index 242f2e51..8c2ce2fc 100644 --- a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/data/serializers/ResourceTypesSerializerTest.kt +++ b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/data/serializers/ResourceTypesSerializerTest.kt @@ -1,4 +1,4 @@ -package org.luxons.sevenwonders.game.data.serializers +package org.luxons.sevenwonders.engine.data.serializers import com.github.salomonbrys.kotson.fromJson import com.github.salomonbrys.kotson.typeToken @@ -7,7 +7,7 @@ import com.google.gson.Gson import com.google.gson.GsonBuilder import org.junit.Before import org.junit.Test -import org.luxons.sevenwonders.game.api.resources.ResourceType +import org.luxons.sevenwonders.model.resources.ResourceType import kotlin.test.assertEquals import kotlin.test.assertNull diff --git a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/data/serializers/ResourcesSerializerTest.kt b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/data/serializers/ResourcesSerializerTest.kt index 58745841..c8074f2d 100644 --- a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/data/serializers/ResourcesSerializerTest.kt +++ b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/data/serializers/ResourcesSerializerTest.kt @@ -1,17 +1,17 @@ -package org.luxons.sevenwonders.game.data.serializers +package org.luxons.sevenwonders.engine.data.serializers import com.github.salomonbrys.kotson.fromJson import com.google.gson.Gson import com.google.gson.GsonBuilder import org.junit.Before import org.junit.Test -import org.luxons.sevenwonders.game.resources.MutableResources -import org.luxons.sevenwonders.game.api.resources.ResourceType.CLAY -import org.luxons.sevenwonders.game.api.resources.ResourceType.STONE -import org.luxons.sevenwonders.game.api.resources.ResourceType.WOOD -import org.luxons.sevenwonders.game.resources.Resources -import org.luxons.sevenwonders.game.resources.emptyResources -import org.luxons.sevenwonders.game.resources.resourcesOf +import org.luxons.sevenwonders.engine.resources.MutableResources +import org.luxons.sevenwonders.model.resources.ResourceType.CLAY +import org.luxons.sevenwonders.model.resources.ResourceType.STONE +import org.luxons.sevenwonders.model.resources.ResourceType.WOOD +import org.luxons.sevenwonders.engine.resources.Resources +import org.luxons.sevenwonders.engine.resources.emptyResources +import org.luxons.sevenwonders.engine.resources.resourcesOf import kotlin.test.assertEquals import kotlin.test.assertNull diff --git a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/data/serializers/ScienceProgressSerializerTest.kt b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/data/serializers/ScienceProgressSerializerTest.kt index 95d72517..19b1e572 100644 --- a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/data/serializers/ScienceProgressSerializerTest.kt +++ b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/data/serializers/ScienceProgressSerializerTest.kt @@ -1,13 +1,13 @@ -package org.luxons.sevenwonders.game.data.serializers +package org.luxons.sevenwonders.engine.data.serializers import com.github.salomonbrys.kotson.fromJson import com.google.gson.Gson import com.google.gson.GsonBuilder import org.junit.Before import org.junit.Test -import org.luxons.sevenwonders.game.boards.ScienceType -import org.luxons.sevenwonders.game.effects.ScienceProgress -import org.luxons.sevenwonders.game.test.createScienceProgress +import org.luxons.sevenwonders.engine.boards.ScienceType +import org.luxons.sevenwonders.engine.effects.ScienceProgress +import org.luxons.sevenwonders.engine.test.createScienceProgress import kotlin.test.assertEquals import kotlin.test.assertFailsWith import kotlin.test.assertNotNull diff --git a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/effects/BonusPerBoardElementTest.kt b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/effects/BonusPerBoardElementTest.kt index 3c72d0aa..ce914aab 100644 --- a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/effects/BonusPerBoardElementTest.kt +++ b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/effects/BonusPerBoardElementTest.kt @@ -1,18 +1,18 @@ -package org.luxons.sevenwonders.game.effects +package org.luxons.sevenwonders.engine.effects import org.junit.Before import org.junit.experimental.theories.DataPoints import org.junit.experimental.theories.Theories import org.junit.experimental.theories.Theory import org.junit.runner.RunWith -import org.luxons.sevenwonders.game.Player -import org.luxons.sevenwonders.game.SimplePlayer -import org.luxons.sevenwonders.game.api.boards.RelativeBoardPosition -import org.luxons.sevenwonders.game.boards.Table -import org.luxons.sevenwonders.game.api.cards.CardBack -import org.luxons.sevenwonders.game.api.cards.Color -import org.luxons.sevenwonders.game.test.addCards -import org.luxons.sevenwonders.game.test.testTable +import org.luxons.sevenwonders.engine.Player +import org.luxons.sevenwonders.engine.SimplePlayer +import org.luxons.sevenwonders.model.boards.RelativeBoardPosition +import org.luxons.sevenwonders.engine.boards.Table +import org.luxons.sevenwonders.model.cards.CardBack +import org.luxons.sevenwonders.model.cards.Color +import org.luxons.sevenwonders.engine.test.addCards +import org.luxons.sevenwonders.engine.test.testTable import kotlin.test.assertEquals @RunWith(Theories::class) diff --git a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/effects/DiscountTest.kt b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/effects/DiscountTest.kt index 9773ec5c..d989d24a 100644 --- a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/effects/DiscountTest.kt +++ b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/effects/DiscountTest.kt @@ -1,14 +1,14 @@ -package org.luxons.sevenwonders.game.effects +package org.luxons.sevenwonders.engine.effects import org.junit.Assume import org.junit.experimental.theories.DataPoints import org.junit.experimental.theories.Theories import org.junit.experimental.theories.Theory import org.junit.runner.RunWith -import org.luxons.sevenwonders.game.api.resources.Provider -import org.luxons.sevenwonders.game.api.resources.ResourceType -import org.luxons.sevenwonders.game.test.createTransactions -import org.luxons.sevenwonders.game.test.testBoard +import org.luxons.sevenwonders.model.resources.Provider +import org.luxons.sevenwonders.model.resources.ResourceType +import org.luxons.sevenwonders.engine.test.createTransactions +import org.luxons.sevenwonders.engine.test.testBoard import kotlin.test.assertEquals @RunWith(Theories::class) diff --git a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/effects/GoldIncreaseTest.kt b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/effects/GoldIncreaseTest.kt index 3ade2773..67bb3862 100644 --- a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/effects/GoldIncreaseTest.kt +++ b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/effects/GoldIncreaseTest.kt @@ -1,13 +1,13 @@ -package org.luxons.sevenwonders.game.effects +package org.luxons.sevenwonders.engine.effects import org.junit.experimental.theories.DataPoints import org.junit.experimental.theories.Theories import org.junit.experimental.theories.Theory import org.junit.runner.RunWith -import org.luxons.sevenwonders.game.SimplePlayer -import org.luxons.sevenwonders.game.api.resources.ResourceType -import org.luxons.sevenwonders.game.test.testBoard -import org.luxons.sevenwonders.game.test.testTable +import org.luxons.sevenwonders.engine.SimplePlayer +import org.luxons.sevenwonders.model.resources.ResourceType +import org.luxons.sevenwonders.engine.test.testBoard +import org.luxons.sevenwonders.engine.test.testTable import kotlin.test.assertEquals @RunWith(Theories::class) diff --git a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/effects/MilitaryReinforcementsTest.kt b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/effects/MilitaryReinforcementsTest.kt index c8a89aaf..23b5959e 100644 --- a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/effects/MilitaryReinforcementsTest.kt +++ b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/effects/MilitaryReinforcementsTest.kt @@ -1,13 +1,13 @@ -package org.luxons.sevenwonders.game.effects +package org.luxons.sevenwonders.engine.effects import org.junit.experimental.theories.DataPoints import org.junit.experimental.theories.Theories import org.junit.experimental.theories.Theory import org.junit.runner.RunWith -import org.luxons.sevenwonders.game.SimplePlayer -import org.luxons.sevenwonders.game.api.resources.ResourceType -import org.luxons.sevenwonders.game.test.testBoard -import org.luxons.sevenwonders.game.test.testTable +import org.luxons.sevenwonders.engine.SimplePlayer +import org.luxons.sevenwonders.model.resources.ResourceType +import org.luxons.sevenwonders.engine.test.testBoard +import org.luxons.sevenwonders.engine.test.testTable import kotlin.test.assertEquals @RunWith(Theories::class) diff --git a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/effects/ProductionIncreaseTest.kt b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/effects/ProductionIncreaseTest.kt index 15366fd0..235b2fa7 100644 --- a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/effects/ProductionIncreaseTest.kt +++ b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/effects/ProductionIncreaseTest.kt @@ -1,15 +1,15 @@ -package org.luxons.sevenwonders.game.effects +package org.luxons.sevenwonders.engine.effects import org.junit.experimental.theories.DataPoints import org.junit.experimental.theories.Theories import org.junit.experimental.theories.Theory import org.junit.runner.RunWith -import org.luxons.sevenwonders.game.SimplePlayer -import org.luxons.sevenwonders.game.api.resources.ResourceType -import org.luxons.sevenwonders.game.resources.resourcesOf -import org.luxons.sevenwonders.game.test.fixedProduction -import org.luxons.sevenwonders.game.test.testBoard -import org.luxons.sevenwonders.game.test.testTable +import org.luxons.sevenwonders.engine.SimplePlayer +import org.luxons.sevenwonders.model.resources.ResourceType +import org.luxons.sevenwonders.engine.resources.resourcesOf +import org.luxons.sevenwonders.engine.test.fixedProduction +import org.luxons.sevenwonders.engine.test.testBoard +import org.luxons.sevenwonders.engine.test.testTable import kotlin.test.assertEquals import kotlin.test.assertFalse import kotlin.test.assertTrue diff --git a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/effects/RawPointsIncreaseTest.kt b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/effects/RawPointsIncreaseTest.kt index 9cb10562..eb48f4ed 100644 --- a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/effects/RawPointsIncreaseTest.kt +++ b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/effects/RawPointsIncreaseTest.kt @@ -1,11 +1,11 @@ -package org.luxons.sevenwonders.game.effects +package org.luxons.sevenwonders.engine.effects import org.junit.experimental.theories.DataPoints import org.junit.experimental.theories.Theories import org.junit.experimental.theories.Theory import org.junit.runner.RunWith -import org.luxons.sevenwonders.game.SimplePlayer -import org.luxons.sevenwonders.game.test.testTable +import org.luxons.sevenwonders.engine.SimplePlayer +import org.luxons.sevenwonders.engine.test.testTable import kotlin.test.assertEquals @RunWith(Theories::class) diff --git a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/effects/ScienceProgressTest.kt b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/effects/ScienceProgressTest.kt index b782f6b3..b7f5e152 100644 --- a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/effects/ScienceProgressTest.kt +++ b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/effects/ScienceProgressTest.kt @@ -1,14 +1,14 @@ -package org.luxons.sevenwonders.game.effects +package org.luxons.sevenwonders.engine.effects import org.junit.experimental.theories.DataPoints import org.junit.experimental.theories.Theories import org.junit.experimental.theories.Theory import org.junit.runner.RunWith -import org.luxons.sevenwonders.game.boards.ScienceType -import org.luxons.sevenwonders.game.api.resources.ResourceType -import org.luxons.sevenwonders.game.test.createScience -import org.luxons.sevenwonders.game.test.createScienceProgress -import org.luxons.sevenwonders.game.test.testBoard +import org.luxons.sevenwonders.engine.boards.ScienceType +import org.luxons.sevenwonders.model.resources.ResourceType +import org.luxons.sevenwonders.engine.test.createScience +import org.luxons.sevenwonders.engine.test.createScienceProgress +import org.luxons.sevenwonders.engine.test.testBoard import kotlin.test.assertEquals @RunWith(Theories::class) diff --git a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/effects/SpecialAbilityActivationTest.kt b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/effects/SpecialAbilityActivationTest.kt index f273783c..16fbeae6 100644 --- a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/effects/SpecialAbilityActivationTest.kt +++ b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/effects/SpecialAbilityActivationTest.kt @@ -1,4 +1,4 @@ -package org.luxons.sevenwonders.game.effects +package org.luxons.sevenwonders.engine.effects import org.junit.Assume import org.junit.Test @@ -6,12 +6,12 @@ import org.junit.experimental.theories.DataPoints import org.junit.experimental.theories.Theories import org.junit.experimental.theories.Theory import org.junit.runner.RunWith -import org.luxons.sevenwonders.game.SimplePlayer -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.test.createGuildCard -import org.luxons.sevenwonders.game.test.testTable +import org.luxons.sevenwonders.engine.SimplePlayer +import org.luxons.sevenwonders.model.boards.RelativeBoardPosition +import org.luxons.sevenwonders.engine.cards.Card +import org.luxons.sevenwonders.model.cards.Color +import org.luxons.sevenwonders.engine.test.createGuildCard +import org.luxons.sevenwonders.engine.test.testTable import kotlin.test.assertEquals import kotlin.test.assertFailsWith import kotlin.test.assertTrue diff --git a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/moves/BuildWonderMoveTest.kt b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/moves/BuildWonderMoveTest.kt index 5d4f0236..764d7890 100644 --- a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/moves/BuildWonderMoveTest.kt +++ b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/moves/BuildWonderMoveTest.kt @@ -1,16 +1,16 @@ -package org.luxons.sevenwonders.game.moves +package org.luxons.sevenwonders.engine.moves import org.junit.Test -import org.luxons.sevenwonders.game.PlayerContext -import org.luxons.sevenwonders.game.Settings -import org.luxons.sevenwonders.game.api.MoveType -import org.luxons.sevenwonders.game.boards.Table -import org.luxons.sevenwonders.game.cards.Card -import org.luxons.sevenwonders.game.test.createMove -import org.luxons.sevenwonders.game.test.sampleCards -import org.luxons.sevenwonders.game.test.testCard -import org.luxons.sevenwonders.game.test.testSettings -import org.luxons.sevenwonders.game.test.testTable +import org.luxons.sevenwonders.engine.PlayerContext +import org.luxons.sevenwonders.engine.Settings +import org.luxons.sevenwonders.model.MoveType +import org.luxons.sevenwonders.engine.boards.Table +import org.luxons.sevenwonders.engine.cards.Card +import org.luxons.sevenwonders.engine.test.createMove +import org.luxons.sevenwonders.engine.test.sampleCards +import org.luxons.sevenwonders.engine.test.testCard +import org.luxons.sevenwonders.engine.test.testSettings +import org.luxons.sevenwonders.engine.test.testTable import kotlin.test.assertEquals import kotlin.test.assertFailsWith import kotlin.test.fail diff --git a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/resources/BestPriceCalculatorTest.kt b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/resources/BestPriceCalculatorTest.kt index c531a866..a003a332 100644 --- a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/resources/BestPriceCalculatorTest.kt +++ b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/resources/BestPriceCalculatorTest.kt @@ -1,21 +1,21 @@ -package org.luxons.sevenwonders.game.resources +package org.luxons.sevenwonders.engine.resources import org.junit.Test -import org.luxons.sevenwonders.game.SimplePlayer -import org.luxons.sevenwonders.game.boards.Table -import org.luxons.sevenwonders.game.api.resources.Provider.LEFT_PLAYER -import org.luxons.sevenwonders.game.api.resources.Provider.RIGHT_PLAYER -import org.luxons.sevenwonders.game.api.resources.ResourceTransactions -import org.luxons.sevenwonders.game.api.resources.ResourceType.CLAY -import org.luxons.sevenwonders.game.api.resources.ResourceType.GLASS -import org.luxons.sevenwonders.game.api.resources.ResourceType.ORE -import org.luxons.sevenwonders.game.api.resources.ResourceType.STONE -import org.luxons.sevenwonders.game.api.resources.ResourceType.WOOD -import org.luxons.sevenwonders.game.api.resources.noTransactions -import org.luxons.sevenwonders.game.test.createTransaction -import org.luxons.sevenwonders.game.test.createTransactions -import org.luxons.sevenwonders.game.test.testBoard -import org.luxons.sevenwonders.game.test.testTable +import org.luxons.sevenwonders.engine.SimplePlayer +import org.luxons.sevenwonders.engine.boards.Table +import org.luxons.sevenwonders.model.resources.Provider.LEFT_PLAYER +import org.luxons.sevenwonders.model.resources.Provider.RIGHT_PLAYER +import org.luxons.sevenwonders.model.resources.ResourceTransactions +import org.luxons.sevenwonders.model.resources.ResourceType.CLAY +import org.luxons.sevenwonders.model.resources.ResourceType.GLASS +import org.luxons.sevenwonders.model.resources.ResourceType.ORE +import org.luxons.sevenwonders.model.resources.ResourceType.STONE +import org.luxons.sevenwonders.model.resources.ResourceType.WOOD +import org.luxons.sevenwonders.model.resources.noTransactions +import org.luxons.sevenwonders.engine.test.createTransaction +import org.luxons.sevenwonders.engine.test.createTransactions +import org.luxons.sevenwonders.engine.test.testBoard +import org.luxons.sevenwonders.engine.test.testTable import kotlin.test.assertEquals class BestPriceCalculatorTest { diff --git a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/resources/ProductionTest.kt b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/resources/ProductionTest.kt index 13d7a10e..c449c784 100644 --- a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/resources/ProductionTest.kt +++ b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/resources/ProductionTest.kt @@ -1,15 +1,15 @@ -package org.luxons.sevenwonders.game.resources +package org.luxons.sevenwonders.engine.resources import org.junit.Before import org.junit.Test -import org.luxons.sevenwonders.game.api.resources.ResourceType -import org.luxons.sevenwonders.game.api.resources.ResourceType.CLAY -import org.luxons.sevenwonders.game.api.resources.ResourceType.GLASS -import org.luxons.sevenwonders.game.api.resources.ResourceType.LOOM -import org.luxons.sevenwonders.game.api.resources.ResourceType.ORE -import org.luxons.sevenwonders.game.api.resources.ResourceType.PAPYRUS -import org.luxons.sevenwonders.game.api.resources.ResourceType.STONE -import org.luxons.sevenwonders.game.api.resources.ResourceType.WOOD +import org.luxons.sevenwonders.model.resources.ResourceType +import org.luxons.sevenwonders.model.resources.ResourceType.CLAY +import org.luxons.sevenwonders.model.resources.ResourceType.GLASS +import org.luxons.sevenwonders.model.resources.ResourceType.LOOM +import org.luxons.sevenwonders.model.resources.ResourceType.ORE +import org.luxons.sevenwonders.model.resources.ResourceType.PAPYRUS +import org.luxons.sevenwonders.model.resources.ResourceType.STONE +import org.luxons.sevenwonders.model.resources.ResourceType.WOOD import java.util.EnumSet import java.util.HashSet import kotlin.test.assertEquals diff --git a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/resources/ResourceTransactionsTest.kt b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/resources/ResourceTransactionsTest.kt index 6ae4169a..665612e3 100644 --- a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/resources/ResourceTransactionsTest.kt +++ b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/resources/ResourceTransactionsTest.kt @@ -1,11 +1,11 @@ -package org.luxons.sevenwonders.game.resources +package org.luxons.sevenwonders.engine.resources import org.junit.Test -import org.luxons.sevenwonders.game.api.resources.Provider -import org.luxons.sevenwonders.game.api.resources.ResourceType -import org.luxons.sevenwonders.game.api.resources.ResourceType.CLAY -import org.luxons.sevenwonders.game.api.resources.ResourceType.WOOD -import org.luxons.sevenwonders.game.test.createTransaction +import org.luxons.sevenwonders.model.resources.Provider +import org.luxons.sevenwonders.model.resources.ResourceType +import org.luxons.sevenwonders.model.resources.ResourceType.CLAY +import org.luxons.sevenwonders.model.resources.ResourceType.WOOD +import org.luxons.sevenwonders.engine.test.createTransaction import kotlin.test.assertEquals class ResourceTransactionsTest { diff --git a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/resources/ResourcesTest.kt b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/resources/ResourcesTest.kt index e53789b6..3aa5acd4 100644 --- a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/resources/ResourcesTest.kt +++ b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/resources/ResourcesTest.kt @@ -1,14 +1,14 @@ -package org.luxons.sevenwonders.game.resources +package org.luxons.sevenwonders.engine.resources import org.junit.Test -import org.luxons.sevenwonders.game.api.resources.ResourceType -import org.luxons.sevenwonders.game.api.resources.ResourceType.CLAY -import org.luxons.sevenwonders.game.api.resources.ResourceType.GLASS -import org.luxons.sevenwonders.game.api.resources.ResourceType.LOOM -import org.luxons.sevenwonders.game.api.resources.ResourceType.ORE -import org.luxons.sevenwonders.game.api.resources.ResourceType.PAPYRUS -import org.luxons.sevenwonders.game.api.resources.ResourceType.STONE -import org.luxons.sevenwonders.game.api.resources.ResourceType.WOOD +import org.luxons.sevenwonders.model.resources.ResourceType +import org.luxons.sevenwonders.model.resources.ResourceType.CLAY +import org.luxons.sevenwonders.model.resources.ResourceType.GLASS +import org.luxons.sevenwonders.model.resources.ResourceType.LOOM +import org.luxons.sevenwonders.model.resources.ResourceType.ORE +import org.luxons.sevenwonders.model.resources.ResourceType.PAPYRUS +import org.luxons.sevenwonders.model.resources.ResourceType.STONE +import org.luxons.sevenwonders.model.resources.ResourceType.WOOD import java.util.NoSuchElementException import kotlin.test.assertEquals import kotlin.test.assertFailsWith diff --git a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/resources/TradingRulesTest.kt b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/resources/TradingRulesTest.kt index 99f85ac2..0301b16c 100644 --- a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/resources/TradingRulesTest.kt +++ b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/resources/TradingRulesTest.kt @@ -1,15 +1,15 @@ -package org.luxons.sevenwonders.game.resources +package org.luxons.sevenwonders.engine.resources import org.junit.Assume.assumeTrue import org.junit.experimental.theories.DataPoints import org.junit.experimental.theories.Theories import org.junit.experimental.theories.Theory import org.junit.runner.RunWith -import org.luxons.sevenwonders.game.api.resources.Provider -import org.luxons.sevenwonders.game.api.resources.ResourceType -import org.luxons.sevenwonders.game.api.resources.noTransactions -import org.luxons.sevenwonders.game.test.createTransaction -import org.luxons.sevenwonders.game.test.createTransactions +import org.luxons.sevenwonders.model.resources.Provider +import org.luxons.sevenwonders.model.resources.ResourceType +import org.luxons.sevenwonders.model.resources.noTransactions +import org.luxons.sevenwonders.engine.test.createTransaction +import org.luxons.sevenwonders.engine.test.createTransactions import kotlin.test.assertEquals @RunWith(Theories::class) diff --git a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/test/TestUtils.kt b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/test/TestUtils.kt index e666140e..7c1935ae 100644 --- a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/test/TestUtils.kt +++ b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/test/TestUtils.kt @@ -1,34 +1,34 @@ -package org.luxons.sevenwonders.game.test - -import org.luxons.sevenwonders.game.Player -import org.luxons.sevenwonders.game.PlayerContext -import org.luxons.sevenwonders.game.Settings -import org.luxons.sevenwonders.game.api.resources.CountedResource -import org.luxons.sevenwonders.game.api.CustomizableSettings -import org.luxons.sevenwonders.game.api.PlayerMove -import org.luxons.sevenwonders.game.boards.Board -import org.luxons.sevenwonders.game.api.boards.RelativeBoardPosition -import org.luxons.sevenwonders.game.boards.Science -import org.luxons.sevenwonders.game.boards.ScienceType -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.api.cards.Color -import org.luxons.sevenwonders.game.cards.Requirements -import org.luxons.sevenwonders.game.effects.Effect -import org.luxons.sevenwonders.game.effects.ScienceProgress -import org.luxons.sevenwonders.game.moves.Move -import org.luxons.sevenwonders.game.api.MoveType -import org.luxons.sevenwonders.game.moves.resolve -import org.luxons.sevenwonders.game.resources.Production -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.game.api.resources.noTransactions -import org.luxons.sevenwonders.game.resources.resourcesOf -import org.luxons.sevenwonders.game.wonders.Wonder -import org.luxons.sevenwonders.game.wonders.WonderStage +package org.luxons.sevenwonders.engine.test + +import org.luxons.sevenwonders.engine.Player +import org.luxons.sevenwonders.engine.PlayerContext +import org.luxons.sevenwonders.engine.Settings +import org.luxons.sevenwonders.model.resources.CountedResource +import org.luxons.sevenwonders.model.CustomizableSettings +import org.luxons.sevenwonders.model.PlayerMove +import org.luxons.sevenwonders.engine.boards.Board +import org.luxons.sevenwonders.model.boards.RelativeBoardPosition +import org.luxons.sevenwonders.engine.boards.Science +import org.luxons.sevenwonders.engine.boards.ScienceType +import org.luxons.sevenwonders.engine.boards.Table +import org.luxons.sevenwonders.engine.cards.Card +import org.luxons.sevenwonders.model.cards.CardBack +import org.luxons.sevenwonders.model.cards.Color +import org.luxons.sevenwonders.engine.cards.Requirements +import org.luxons.sevenwonders.engine.effects.Effect +import org.luxons.sevenwonders.engine.effects.ScienceProgress +import org.luxons.sevenwonders.engine.moves.Move +import org.luxons.sevenwonders.model.MoveType +import org.luxons.sevenwonders.engine.moves.resolve +import org.luxons.sevenwonders.engine.resources.Production +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 +import org.luxons.sevenwonders.model.resources.noTransactions +import org.luxons.sevenwonders.engine.resources.resourcesOf +import org.luxons.sevenwonders.engine.wonders.Wonder +import org.luxons.sevenwonders.engine.wonders.WonderStage private const val SEED: Long = 42 @@ -75,8 +75,7 @@ internal fun createTransactions(provider: Provider, vararg resources: ResourceTy internal fun createTransactions(vararg transactions: ResourceTransaction): ResourceTransactions = transactions.toSet() internal fun createTransaction(provider: Provider, vararg resources: ResourceType): ResourceTransaction = - ResourceTransaction( - provider, + ResourceTransaction(provider, resources.map { CountedResource(1, it) }) internal fun createRequirements(vararg types: ResourceType): Requirements = Requirements(resources = resourcesOf(*types)) diff --git a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/wonders/WonderTest.kt b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/wonders/WonderTest.kt index 156055ff..1857ebe8 100644 --- a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/wonders/WonderTest.kt +++ b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/wonders/WonderTest.kt @@ -1,8 +1,8 @@ -package org.luxons.sevenwonders.game.wonders +package org.luxons.sevenwonders.engine.wonders import org.junit.Test -import org.luxons.sevenwonders.game.api.cards.CardBack -import org.luxons.sevenwonders.game.test.testWonder +import org.luxons.sevenwonders.model.cards.CardBack +import org.luxons.sevenwonders.engine.test.testWonder import kotlin.test.assertEquals import kotlin.test.assertFailsWith diff --git a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/api/BoardsKtTest.kt b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/model/BoardsKtTest.kt index ede165f7..1dd19704 100644 --- a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/api/BoardsKtTest.kt +++ b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/model/BoardsKtTest.kt @@ -1,8 +1,10 @@ -package org.luxons.sevenwonders.game.api +package org.luxons.sevenwonders.model -import org.luxons.sevenwonders.game.api.cards.Color -import org.luxons.sevenwonders.game.api.cards.TableCard -import org.luxons.sevenwonders.game.test.testCard +import org.luxons.sevenwonders.engine.converters.toColumns +import org.luxons.sevenwonders.engine.converters.toTableCard +import org.luxons.sevenwonders.engine.test.testCard +import org.luxons.sevenwonders.model.cards.Color +import org.luxons.sevenwonders.model.cards.TableCard import kotlin.test.Test import kotlin.test.assertEquals @@ -11,7 +13,7 @@ class BoardsKtTest { @Test fun `toColumns on empty list should return no cols`() { val cols = emptyList<TableCard>().toColumns() - assertEquals(emptyList<List<TableCard>>(), cols) + assertEquals(emptyList(), cols) } @Test diff --git a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/api/TableTest.kt b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/model/TableTest.kt index 65bd2b1b..dc461c4d 100644 --- a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/api/TableTest.kt +++ b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/model/TableTest.kt @@ -1,13 +1,13 @@ -package org.luxons.sevenwonders.game.api +package org.luxons.sevenwonders.model import org.junit.Assume.assumeTrue import org.junit.experimental.theories.DataPoints import org.junit.experimental.theories.Theories import org.junit.experimental.theories.Theory import org.junit.runner.RunWith -import org.luxons.sevenwonders.game.api.boards.RelativeBoardPosition -import org.luxons.sevenwonders.game.test.createGuildCards -import org.luxons.sevenwonders.game.test.testTable +import org.luxons.sevenwonders.model.boards.RelativeBoardPosition +import org.luxons.sevenwonders.engine.test.createGuildCards +import org.luxons.sevenwonders.engine.test.testTable import kotlin.test.assertEquals @RunWith(Theories::class) |