diff options
author | Joffrey BION <joffrey.bion@gmail.com> | 2019-05-22 01:41:08 +0200 |
---|---|---|
committer | Joffrey BION <joffrey.bion@gmail.com> | 2019-05-22 01:41:08 +0200 |
commit | 2428a88a5400ca9aa5465beb5ecf06491acad3c7 (patch) | |
tree | b35371d87a12b6247e15073dcf6f59c4ab7bcda7 /sw-engine/src/test/kotlin/org | |
parent | Comment plugin management related to unused multiplatform plugin (diff) | |
download | seven-wonders-2428a88a5400ca9aa5465beb5ecf06491acad3c7.tar.gz seven-wonders-2428a88a5400ca9aa5465beb5ecf06491acad3c7.tar.bz2 seven-wonders-2428a88a5400ca9aa5465beb5ecf06491acad3c7.zip |
Move common module declarations into api package
Diffstat (limited to 'sw-engine/src/test/kotlin/org')
30 files changed, 104 insertions, 82 deletions
diff --git a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/GameTest.kt b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/GameTest.kt index 82075d5c..a3b5cf62 100644 --- a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/GameTest.kt +++ b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/GameTest.kt @@ -4,13 +4,13 @@ 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.cards.HandCard -import org.luxons.sevenwonders.game.cards.TableCard +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.moves.MoveType -import org.luxons.sevenwonders.game.resources.ResourceTransactions -import org.luxons.sevenwonders.game.resources.noTransactions +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 import kotlin.test.Test import kotlin.test.assertEquals @@ -80,7 +80,9 @@ class GameTest { return if (playableCard != null) { planMove(turnInfo, MoveType.PLAY, playableCard, playableCard.playability.cheapestTransactions.first()) } else { - planMove(turnInfo, MoveType.DISCARD, turnInfo.hand.first(), noTransactions()) + planMove(turnInfo, MoveType.DISCARD, turnInfo.hand.first(), + noTransactions() + ) } } @@ -92,7 +94,9 @@ class GameTest { return MoveExpectation( turnInfo.playerIndex, PlayerMove(MoveType.COPY_GUILD, neighbourGuilds.first().name), - PlayedMove(turnInfo.playerIndex, MoveType.COPY_GUILD, neighbourGuilds.first(), noTransactions()) + PlayedMove(turnInfo.playerIndex, MoveType.COPY_GUILD, neighbourGuilds.first(), + noTransactions() + ) ) } @@ -111,13 +115,6 @@ class GameTest { private fun HandCard.toPlayedCard(): TableCard = TableCard( - name, - color, - requirements, - chainParent, - chainChildren, - image, - back, - true + name, color, requirements, chainParent, chainChildren, image, back, true ) } diff --git a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/api/BoardsKtTest.kt b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/api/BoardsKtTest.kt index 244c30a8..ede165f7 100644 --- a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/api/BoardsKtTest.kt +++ b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/api/BoardsKtTest.kt @@ -1,7 +1,7 @@ package org.luxons.sevenwonders.game.api -import org.luxons.sevenwonders.game.cards.Color -import org.luxons.sevenwonders.game.cards.TableCard +import org.luxons.sevenwonders.game.api.cards.Color +import org.luxons.sevenwonders.game.api.cards.TableCard import org.luxons.sevenwonders.game.test.testCard import kotlin.test.Test import kotlin.test.assertEquals diff --git a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/api/TableTest.kt b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/api/TableTest.kt index 19e4e8e8..65bd2b1b 100644 --- a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/api/TableTest.kt +++ b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/api/TableTest.kt @@ -5,7 +5,7 @@ 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.RelativeBoardPosition +import org.luxons.sevenwonders.game.api.boards.RelativeBoardPosition import org.luxons.sevenwonders.game.test.createGuildCards import org.luxons.sevenwonders.game.test.testTable import kotlin.test.assertEquals diff --git a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/boards/BoardTest.kt b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/boards/BoardTest.kt index d1b7c239..669934aa 100644 --- a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/boards/BoardTest.kt +++ b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/boards/BoardTest.kt @@ -9,11 +9,11 @@ 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.cards.Color +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.resources.ResourceType +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 diff --git a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/boards/RelativeBoardPositionTest.kt b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/boards/RelativeBoardPositionTest.kt index 2038a676..75743b86 100644 --- a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/boards/RelativeBoardPositionTest.kt +++ b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/boards/RelativeBoardPositionTest.kt @@ -5,6 +5,7 @@ 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 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/game/cards/CardBackTest.kt index 66ff7a0e..967735b8 100644 --- a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/cards/CardBackTest.kt +++ b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/cards/CardBackTest.kt @@ -1,6 +1,7 @@ package org.luxons.sevenwonders.game.cards import org.junit.Test +import org.luxons.sevenwonders.game.api.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/game/cards/CardTest.kt index b6fecbd0..56fc9725 100644 --- a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/cards/CardTest.kt +++ b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/cards/CardTest.kt @@ -2,12 +2,13 @@ package org.luxons.sevenwonders.game.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.resources.ResourceType -import org.luxons.sevenwonders.game.resources.noTransactions +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 diff --git a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/cards/HandRotationDirectionTest.kt b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/cards/HandRotationDirectionTest.kt index 4582c4a1..2fbaf8ed 100644 --- a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/cards/HandRotationDirectionTest.kt +++ b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/cards/HandRotationDirectionTest.kt @@ -1,6 +1,7 @@ package org.luxons.sevenwonders.game.cards import org.junit.Test +import org.luxons.sevenwonders.game.api.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/game/cards/HandsTest.kt index c7ff9106..4c9f258c 100644 --- a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/cards/HandsTest.kt +++ b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/cards/HandsTest.kt @@ -8,6 +8,7 @@ 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 kotlin.test.assertEquals diff --git a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/cards/RequirementsTest.kt b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/cards/RequirementsTest.kt index eccca3e7..4bed43b3 100644 --- a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/cards/RequirementsTest.kt +++ b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/cards/RequirementsTest.kt @@ -8,10 +8,10 @@ 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.resources.Provider -import org.luxons.sevenwonders.game.resources.ResourceType +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.resources.noTransactions +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 @@ -43,7 +43,9 @@ class RequirementsTest { val board = testBoard(ResourceType.CLAY, boardGold) val player = singleBoardPlayer(board) - assertEquals(boardGold >= requiredGold, requirements.areMetWithHelpBy(board, noTransactions())) + assertEquals(boardGold >= requiredGold, requirements.areMetWithHelpBy(board, + noTransactions() + )) val satisfaction = requirements.assess(player) if (boardGold >= requiredGold) { @@ -64,7 +66,9 @@ class RequirementsTest { val board = testBoard(initialResource, 0) val player = singleBoardPlayer(board) - assertEquals(initialResource == requiredResource, requirements.areMetWithHelpBy(board, noTransactions())) + assertEquals(initialResource == requiredResource, requirements.areMetWithHelpBy(board, + noTransactions() + )) if (initialResource == requiredResource) { val satisfaction = requirements.assess(player) @@ -86,7 +90,9 @@ class RequirementsTest { board.production.addFixedResource(producedResource, 1) val player = singleBoardPlayer(board) - assertEquals(producedResource == requiredResource, requirements.areMetWithHelpBy(board, noTransactions())) + assertEquals(producedResource == requiredResource, requirements.areMetWithHelpBy(board, + noTransactions() + )) if (producedResource == requiredResource) { val satisfaction = requirements.assess(player) 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/game/data/serializers/ProductionIncreaseSerializerTest.kt index 31d695e8..5ea60d5d 100644 --- a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/data/serializers/ProductionIncreaseSerializerTest.kt +++ b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/data/serializers/ProductionIncreaseSerializerTest.kt @@ -9,7 +9,7 @@ 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.resources.ResourceType +import org.luxons.sevenwonders.game.api.resources.ResourceType import org.luxons.sevenwonders.game.resources.Resources import kotlin.test.assertEquals import kotlin.test.assertFailsWith 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/game/data/serializers/ProductionSerializerTest.kt index 265087ba..4fbd8373 100644 --- a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/data/serializers/ProductionSerializerTest.kt +++ b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/data/serializers/ProductionSerializerTest.kt @@ -8,7 +8,7 @@ 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.resources.ResourceType +import org.luxons.sevenwonders.game.api.resources.ResourceType import org.luxons.sevenwonders.game.resources.Resources import kotlin.test.assertEquals import kotlin.test.assertFailsWith 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/game/data/serializers/ResourceTypeSerializerTest.kt index f2b07e84..c5e7b53d 100644 --- a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/data/serializers/ResourceTypeSerializerTest.kt +++ b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/data/serializers/ResourceTypeSerializerTest.kt @@ -5,7 +5,7 @@ import com.google.gson.Gson import com.google.gson.GsonBuilder import org.junit.Before import org.junit.Test -import org.luxons.sevenwonders.game.resources.ResourceType +import org.luxons.sevenwonders.game.api.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/game/data/serializers/ResourceTypesSerializerTest.kt index 8c1b421d..242f2e51 100644 --- a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/data/serializers/ResourceTypesSerializerTest.kt +++ b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/data/serializers/ResourceTypesSerializerTest.kt @@ -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.resources.ResourceType +import org.luxons.sevenwonders.game.api.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/game/data/serializers/ResourcesSerializerTest.kt index c146a948..58745841 100644 --- a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/data/serializers/ResourcesSerializerTest.kt +++ b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/data/serializers/ResourcesSerializerTest.kt @@ -6,9 +6,9 @@ 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.resources.ResourceType.CLAY -import org.luxons.sevenwonders.game.resources.ResourceType.STONE -import org.luxons.sevenwonders.game.resources.ResourceType.WOOD +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 diff --git a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/effects/BonusPerBoardElementTest.kt b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/effects/BonusPerBoardElementTest.kt index 700eddb1..3c72d0aa 100644 --- a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/effects/BonusPerBoardElementTest.kt +++ b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/effects/BonusPerBoardElementTest.kt @@ -7,10 +7,10 @@ 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.boards.RelativeBoardPosition +import org.luxons.sevenwonders.game.api.boards.RelativeBoardPosition import org.luxons.sevenwonders.game.boards.Table -import org.luxons.sevenwonders.game.cards.CardBack -import org.luxons.sevenwonders.game.cards.Color +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 kotlin.test.assertEquals diff --git a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/effects/DiscountTest.kt b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/effects/DiscountTest.kt index d92c8d24..9773ec5c 100644 --- a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/effects/DiscountTest.kt +++ b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/effects/DiscountTest.kt @@ -5,8 +5,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.resources.Provider -import org.luxons.sevenwonders.game.resources.ResourceType +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 kotlin.test.assertEquals diff --git a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/effects/GoldIncreaseTest.kt b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/effects/GoldIncreaseTest.kt index 993cc273..3ade2773 100644 --- a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/effects/GoldIncreaseTest.kt +++ b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/effects/GoldIncreaseTest.kt @@ -5,7 +5,7 @@ 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.resources.ResourceType +import org.luxons.sevenwonders.game.api.resources.ResourceType import org.luxons.sevenwonders.game.test.testBoard import org.luxons.sevenwonders.game.test.testTable import kotlin.test.assertEquals diff --git a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/effects/MilitaryReinforcementsTest.kt b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/effects/MilitaryReinforcementsTest.kt index 0d5765da..c8a89aaf 100644 --- a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/effects/MilitaryReinforcementsTest.kt +++ b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/effects/MilitaryReinforcementsTest.kt @@ -5,7 +5,7 @@ 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.resources.ResourceType +import org.luxons.sevenwonders.game.api.resources.ResourceType import org.luxons.sevenwonders.game.test.testBoard import org.luxons.sevenwonders.game.test.testTable import kotlin.test.assertEquals diff --git a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/effects/ProductionIncreaseTest.kt b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/effects/ProductionIncreaseTest.kt index c016ccc9..15366fd0 100644 --- a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/effects/ProductionIncreaseTest.kt +++ b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/effects/ProductionIncreaseTest.kt @@ -5,7 +5,7 @@ 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.resources.ResourceType +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 diff --git a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/effects/ScienceProgressTest.kt b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/effects/ScienceProgressTest.kt index 7e566a8c..b782f6b3 100644 --- a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/effects/ScienceProgressTest.kt +++ b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/effects/ScienceProgressTest.kt @@ -5,7 +5,7 @@ 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.resources.ResourceType +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 diff --git a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/effects/SpecialAbilityActivationTest.kt b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/effects/SpecialAbilityActivationTest.kt index aae3be8e..f273783c 100644 --- a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/effects/SpecialAbilityActivationTest.kt +++ b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/effects/SpecialAbilityActivationTest.kt @@ -7,9 +7,9 @@ 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.RelativeBoardPosition +import org.luxons.sevenwonders.game.api.boards.RelativeBoardPosition import org.luxons.sevenwonders.game.cards.Card -import org.luxons.sevenwonders.game.cards.Color +import org.luxons.sevenwonders.game.api.cards.Color import org.luxons.sevenwonders.game.test.createGuildCard import org.luxons.sevenwonders.game.test.testTable import kotlin.test.assertEquals diff --git a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/moves/BuildWonderMoveTest.kt b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/moves/BuildWonderMoveTest.kt index 21b92872..5d4f0236 100644 --- a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/moves/BuildWonderMoveTest.kt +++ b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/moves/BuildWonderMoveTest.kt @@ -3,6 +3,7 @@ package org.luxons.sevenwonders.game.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 diff --git a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/resources/BestPriceCalculatorTest.kt b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/resources/BestPriceCalculatorTest.kt index b4c3b886..c531a866 100644 --- a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/resources/BestPriceCalculatorTest.kt +++ b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/resources/BestPriceCalculatorTest.kt @@ -3,13 +3,15 @@ package org.luxons.sevenwonders.game.resources import org.junit.Test import org.luxons.sevenwonders.game.SimplePlayer import org.luxons.sevenwonders.game.boards.Table -import org.luxons.sevenwonders.game.resources.Provider.LEFT_PLAYER -import org.luxons.sevenwonders.game.resources.Provider.RIGHT_PLAYER -import org.luxons.sevenwonders.game.resources.ResourceType.CLAY -import org.luxons.sevenwonders.game.resources.ResourceType.GLASS -import org.luxons.sevenwonders.game.resources.ResourceType.ORE -import org.luxons.sevenwonders.game.resources.ResourceType.STONE -import org.luxons.sevenwonders.game.resources.ResourceType.WOOD +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 diff --git a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/resources/ProductionTest.kt b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/resources/ProductionTest.kt index 0e865921..13d7a10e 100644 --- a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/resources/ProductionTest.kt +++ b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/resources/ProductionTest.kt @@ -2,13 +2,14 @@ package org.luxons.sevenwonders.game.resources import org.junit.Before import org.junit.Test -import org.luxons.sevenwonders.game.resources.ResourceType.CLAY -import org.luxons.sevenwonders.game.resources.ResourceType.GLASS -import org.luxons.sevenwonders.game.resources.ResourceType.LOOM -import org.luxons.sevenwonders.game.resources.ResourceType.ORE -import org.luxons.sevenwonders.game.resources.ResourceType.PAPYRUS -import org.luxons.sevenwonders.game.resources.ResourceType.STONE -import org.luxons.sevenwonders.game.resources.ResourceType.WOOD +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 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/game/resources/ResourceTransactionsTest.kt index 7e6d7816..6ae4169a 100644 --- a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/resources/ResourceTransactionsTest.kt +++ b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/resources/ResourceTransactionsTest.kt @@ -1,8 +1,10 @@ package org.luxons.sevenwonders.game.resources import org.junit.Test -import org.luxons.sevenwonders.game.resources.ResourceType.CLAY -import org.luxons.sevenwonders.game.resources.ResourceType.WOOD +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 kotlin.test.assertEquals diff --git a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/resources/ResourcesTest.kt b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/resources/ResourcesTest.kt index 634a25c7..e53789b6 100644 --- a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/resources/ResourcesTest.kt +++ b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/resources/ResourcesTest.kt @@ -1,13 +1,14 @@ package org.luxons.sevenwonders.game.resources import org.junit.Test -import org.luxons.sevenwonders.game.resources.ResourceType.CLAY -import org.luxons.sevenwonders.game.resources.ResourceType.GLASS -import org.luxons.sevenwonders.game.resources.ResourceType.LOOM -import org.luxons.sevenwonders.game.resources.ResourceType.ORE -import org.luxons.sevenwonders.game.resources.ResourceType.PAPYRUS -import org.luxons.sevenwonders.game.resources.ResourceType.STONE -import org.luxons.sevenwonders.game.resources.ResourceType.WOOD +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 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/game/resources/TradingRulesTest.kt index 38953529..99f85ac2 100644 --- a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/resources/TradingRulesTest.kt +++ b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/resources/TradingRulesTest.kt @@ -5,6 +5,9 @@ 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 kotlin.test.assertEquals diff --git a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/test/TestUtils.kt b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/test/TestUtils.kt index 07e22a56..e666140e 100644 --- a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/test/TestUtils.kt +++ b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/test/TestUtils.kt @@ -3,29 +3,29 @@ 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.resources.CountedResource +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.boards.RelativeBoardPosition +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.cards.CardBack -import org.luxons.sevenwonders.game.cards.Color +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.moves.MoveType +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.resources.Provider -import org.luxons.sevenwonders.game.resources.ResourceTransaction -import org.luxons.sevenwonders.game.resources.ResourceTransactions -import org.luxons.sevenwonders.game.resources.ResourceType -import org.luxons.sevenwonders.game.resources.noTransactions +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 @@ -75,7 +75,9 @@ 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, resources.map { CountedResource(1, it) }) + ResourceTransaction( + provider, + resources.map { CountedResource(1, it) }) internal fun createRequirements(vararg types: ResourceType): Requirements = Requirements(resources = resourcesOf(*types)) @@ -94,7 +96,9 @@ internal fun testCard( effect: Effect? = null ): Card { val effects = if (effect == null) emptyList() else listOf(effect) - return Card(name, color, requirements, effects, null, emptyList(), "path/to/card/image", CardBack("image-III")) + return Card(name, color, requirements, effects, null, emptyList(), "path/to/card/image", + CardBack("image-III") + ) } internal fun addCards(board: Board, nbCardsOfColor: Int, nbOtherCards: Int, color: Color) { diff --git a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/wonders/WonderTest.kt b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/wonders/WonderTest.kt index 491d13fb..156055ff 100644 --- a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/wonders/WonderTest.kt +++ b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/game/wonders/WonderTest.kt @@ -1,7 +1,7 @@ package org.luxons.sevenwonders.game.wonders import org.junit.Test -import org.luxons.sevenwonders.game.cards.CardBack +import org.luxons.sevenwonders.game.api.cards.CardBack import org.luxons.sevenwonders.game.test.testWonder import kotlin.test.assertEquals import kotlin.test.assertFailsWith |