Polish table and clarify showdown results
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user