diff options
author | jbion <joffrey.bion@amadeus.com> | 2019-02-20 22:25:44 +0100 |
---|---|---|
committer | jbion <joffrey.bion@amadeus.com> | 2019-02-20 22:30:17 +0100 |
commit | 3d372676e5db4abf180ba194b9aacc9c4d02320a (patch) | |
tree | f47c53d2f41370016462f93e22e9277b2a5f097e /game-engine/src/test/kotlin/org | |
parent | Improve hand playability calculations and API output (diff) | |
download | seven-wonders-3d372676e5db4abf180ba194b9aacc9c4d02320a.tar.gz seven-wonders-3d372676e5db4abf180ba194b9aacc9c4d02320a.tar.bz2 seven-wonders-3d372676e5db4abf180ba194b9aacc9c4d02320a.zip |
Simplify playability further
Diffstat (limited to 'game-engine/src/test/kotlin/org')
-rw-r--r-- | game-engine/src/test/kotlin/org/luxons/sevenwonders/game/GameTest.kt | 4 | ||||
-rw-r--r-- | game-engine/src/test/kotlin/org/luxons/sevenwonders/game/cards/RequirementsTest.kt | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/GameTest.kt b/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/GameTest.kt index 5b9d36d0..fd857168 100644 --- a/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/GameTest.kt +++ b/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/GameTest.kt @@ -77,10 +77,10 @@ class GameTest { } private fun createPlayCardMove(turnInfo: PlayerTurnInfo): PlayerMove { - val playableCard = turnInfo.hand.firstOrNull { it.isPlayable } + val playableCard = turnInfo.hand.firstOrNull { it.playability.isPlayable } return if (playableCard != null) { - PlayerMove(MoveType.PLAY, playableCard.name, playableCard.cheapestTransactions.first()) + PlayerMove(MoveType.PLAY, playableCard.name, playableCard.playability.cheapestTransactions.first()) } else { PlayerMove(MoveType.DISCARD, turnInfo.hand.first().name) } diff --git a/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/cards/RequirementsTest.kt b/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/cards/RequirementsTest.kt index 4ed244b6..5f6c18b0 100644 --- a/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/cards/RequirementsTest.kt +++ b/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/cards/RequirementsTest.kt @@ -123,7 +123,7 @@ class RequirementsTest { ) assertEquals(RequirementsSatisfaction.metWithHelp(2, transactions), satisfaction) } else { - assertEquals(RequirementsSatisfaction.resourcesUnavailable(), satisfaction) + assertEquals(RequirementsSatisfaction.unavailableResources(), satisfaction) } } |