FA-82078 / Poker hand evaluation / Member archive
Ace-to-five wheel treated as a straight in deuce-to-seven · case 03
A-2-3-4-5 is scored as a straight, losing to king-high hands it should beat and never being compared as ace high.
Case contract
Input: [hand_a, hand_b] five distinct cards each. Deuce-to-seven lowball: aces are always high, A-2-3-4-5 is not a straight, straights and flushes count against the hand, and the standard high-hand ordering is inverted so the weaker high hand wins. Return 1 if hand_a wins, -1 if hand_b wins, 0 for a tie.
Why this case matters
Lowball variants reuse high-hand evaluators with inverted outcomes, a common source of subtle bugs.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| wheel vs pair | -1 | 1 | Failed |
MEMBER ARCHIVE
The complete case is available to members.
This record includes three runnable implementations, regression fixtures, execution results, and source hashes.
Member access is invitation-based. Sign in with your invited account to inspect the sources.
Sign in to the archive ↗