From 3d372676e5db4abf180ba194b9aacc9c4d02320a Mon Sep 17 00:00:00 2001 From: jbion Date: Wed, 20 Feb 2019 22:25:44 +0100 Subject: Simplify playability further --- game-engine/src/test/kotlin/org/luxons/sevenwonders/game/GameTest.kt | 4 ++-- .../kotlin/org/luxons/sevenwonders/game/cards/RequirementsTest.kt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'game-engine/src/test') 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) } } -- cgit