summaryrefslogtreecommitdiff
path: root/sw-engine/src/test/kotlin/org/luxons
diff options
context:
space:
mode:
authorjoffrey-bion <joffrey.bion@gmail.com>2020-11-29 20:41:21 +0100
committerjoffrey-bion <joffrey.bion@gmail.com>2020-11-29 20:48:17 +0100
commit0fc3ff817cf4691a521df0b35a8d60cbb7cb947c (patch)
tree0aa62a2977bd0ebabec22a9e15cb4c4969d2986c /sw-engine/src/test/kotlin/org/luxons
parentAdd rotation to "best price indicator" (diff)
downloadseven-wonders-0fc3ff817cf4691a521df0b35a8d60cbb7cb947c.tar.gz
seven-wonders-0fc3ff817cf4691a521df0b35a8d60cbb7cb947c.tar.bz2
seven-wonders-0fc3ff817cf4691a521df0b35a8d60cbb7cb947c.zip
Allow the COPY_GUILD ability to yield 0 points
If the neighbours don't have guild cards, we can't copy them, so it's normal not to have one.
Diffstat (limited to 'sw-engine/src/test/kotlin/org/luxons')
-rw-r--r--sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/effects/SpecialAbilityActivationTest.kt8
1 files changed, 3 insertions, 5 deletions
diff --git a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/effects/SpecialAbilityActivationTest.kt b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/effects/SpecialAbilityActivationTest.kt
index 50be6c24..978be53b 100644
--- a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/effects/SpecialAbilityActivationTest.kt
+++ b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/effects/SpecialAbilityActivationTest.kt
@@ -13,7 +13,6 @@ import org.luxons.sevenwonders.engine.test.testTable
import org.luxons.sevenwonders.model.boards.RelativeBoardPosition
import org.luxons.sevenwonders.model.cards.Color
import kotlin.test.assertEquals
-import kotlin.test.assertFailsWith
import kotlin.test.assertTrue
@RunWith(Theories::class)
@@ -53,13 +52,12 @@ class SpecialAbilityActivationTest {
assertEquals(directPointsFromGuildCard, effect.computePoints(player))
}
+ // there can be no copiedGuild if no neighbour had any guild cards
@Test
- fun computePoints_copyGuild_failWhenNoChosenGuild() {
+ fun computePoints_copyGuild_noPointWhenNoChosenGuild() {
val effect = SpecialAbilityActivation(SpecialAbility.COPY_GUILD)
val player = SimplePlayer(0, testTable(5))
- assertFailsWith<IllegalStateException> {
- effect.computePoints(player)
- }
+ assertEquals(0, effect.computePoints(player))
}
companion object {
bgstack15