summaryrefslogtreecommitdiff
path: root/game-engine/src/test
diff options
context:
space:
mode:
authorjbion <joffrey.bion@amadeus.com>2019-02-20 22:25:44 +0100
committerjbion <joffrey.bion@amadeus.com>2019-02-20 22:30:17 +0100
commit3d372676e5db4abf180ba194b9aacc9c4d02320a (patch)
treef47c53d2f41370016462f93e22e9277b2a5f097e /game-engine/src/test
parentImprove hand playability calculations and API output (diff)
downloadseven-wonders-3d372676e5db4abf180ba194b9aacc9c4d02320a.tar.gz
seven-wonders-3d372676e5db4abf180ba194b9aacc9c4d02320a.tar.bz2
seven-wonders-3d372676e5db4abf180ba194b9aacc9c4d02320a.zip
Simplify playability further
Diffstat (limited to 'game-engine/src/test')
-rw-r--r--game-engine/src/test/kotlin/org/luxons/sevenwonders/game/GameTest.kt4
-rw-r--r--game-engine/src/test/kotlin/org/luxons/sevenwonders/game/cards/RequirementsTest.kt2
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)
}
}
bgstack15