diff options
author | Joffrey Bion <joffrey.bion@booking.com> | 2020-05-28 12:47:00 +0200 |
---|---|---|
committer | Joffrey Bion <joffrey.bion@booking.com> | 2020-05-28 13:34:57 +0200 |
commit | a4da60fa4a816e3b8428eaffd2bd605dc0aed031 (patch) | |
tree | 18fcef04d9826fb94854c1a38584460659d8a3dd /sw-engine/src/test/kotlin/org/luxons | |
parent | Add server-side support for PLAY_FREE_DISCARDED special ability (diff) | |
download | seven-wonders-a4da60fa4a816e3b8428eaffd2bd605dc0aed031.tar.gz seven-wonders-a4da60fa4a816e3b8428eaffd2bd605dc0aed031.tar.bz2 seven-wonders-a4da60fa4a816e3b8428eaffd2bd605dc0aed031.zip |
Add UI support for playing discarded cards
Resolves:
https://github.com/joffrey-bion/seven-wonders/issues/25
Resolves:
https://github.com/joffrey-bion/seven-wonders/issues/26
Diffstat (limited to 'sw-engine/src/test/kotlin/org/luxons')
-rw-r--r-- | sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/GameTest.kt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/GameTest.kt b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/GameTest.kt index e1a1b4a7..51a6376a 100644 --- a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/GameTest.kt +++ b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/GameTest.kt @@ -77,7 +77,7 @@ class GameTest { private fun PlayerTurnInfo.firstAvailableMove(): MoveExpectation? = when (action) { Action.PLAY, Action.PLAY_2, Action.PLAY_LAST -> createPlayCardMove(this) - Action.PLAY_FREE_DISCARDED -> createPlayFreeDiscardedMove(this) + Action.PLAY_FREE_DISCARDED -> createPlayFreeDiscardedCardMove(this) Action.PICK_NEIGHBOR_GUILD -> createPickGuildMove(this) Action.WAIT, Action.SAY_READY -> null Action.WATCH_SCORE -> fail("should not have WATCH_SCORE action before end of game") @@ -97,7 +97,7 @@ class GameTest { } } - private fun createPlayFreeDiscardedMove(turn: PlayerTurnInfo): MoveExpectation { + private fun createPlayFreeDiscardedCardMove(turn: PlayerTurnInfo): MoveExpectation { val card = turn.discardedCards?.random() ?: error("No discarded card to play") return MoveExpectation( turn.playerIndex, |