Engine: test that over-cutting and going higher apply over the partner too
Release / build (push) Successful in 4m46s
Release / build (push) Successful in 4m46s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ebae0a2d05
commit
0d70bf4d5e
1 file changed
+14
@@ -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")
|
||||
|
||||
Reference in new issue
Block a user