Polish table and clarify showdown results

This commit is contained in:
Jay
2026-07-26 21:46:28 -04:00
parent b8087a9872
commit df4d90f40b
9 changed files with 1625 additions and 277 deletions
@@ -78,6 +78,47 @@ class ActionButtonsTest {
assertFalse(buttonsFor(offer(canRaise = false)).showRaise)
}
@Test
fun `raise presets use the pot after calling and legal raise-to amounts`() {
val decision = offer(
toCall = 10,
minRaiseTo = 20,
maxRaiseTo = 500,
)
assertEquals(
listOf(
RaisePreset("Min", 20),
RaisePreset("½ pot", 35),
RaisePreset("Pot", 60),
RaisePreset("All in", 500),
),
raisePresets(decision),
)
}
@Test
fun `raise presets drop clamped duplicates instead of mislabelling them`() {
val decision = offer(
toCall = 10,
minRaiseTo = 45,
maxRaiseTo = 50,
stack = 50,
)
assertEquals(
listOf(RaisePreset("Min", 45), RaisePreset("All in", 50)),
raisePresets(decision),
)
}
@Test
fun `a single legal shove has one all-in preset`() {
val decision = offer(minRaiseTo = 200, maxRaiseTo = 120, stack = 120)
assertEquals(listOf(RaisePreset("All in", 120)), raisePresets(decision))
}
// ---------- fold and call ----------
@Test