diff --git a/engine/src/jvmTest/kotlin/hr/bela/engine/PlayRulesTest.kt b/engine/src/jvmTest/kotlin/hr/bela/engine/PlayRulesTest.kt index 4c910c2..833b790 100644 --- a/engine/src/jvmTest/kotlin/hr/bela/engine/PlayRulesTest.kt +++ b/engine/src/jvmTest/kotlin/hr/bela/engine/PlayRulesTest.kt @@ -75,6 +75,20 @@ class PlayRulesTest { assertEquals(setOf(c("KA")), legal(hand, "KK", "K8")) } + @Test + fun `must over-cut even the partner's cut`() { + // Seat 1 cuts, seat 3 (its partner) is out of the led suit and must cut higher. + val hand = cards("H7", "HJ", "PA") + assertEquals(setOf(c("HJ")), legal(hand, "KK", "HA", "P7")) + } + + @Test + fun `must go higher in trump even over the partner`() { + // Seat 0 leads a trump, seat 2 (its partner) must still go higher. + val hand = cards("HA", "HQ", "PA") + assertEquals(setOf(c("HA")), legal(hand, "HK", "H8")) + } + @Test fun `any card when out of the led suit and out of trumps`() { val hand = cards("PA", "T7")