FA-82025 / Poker hand evaluation / Member archive
All-in player excluded from the pot they capped · case 05
The player whose all-in defines a level is not eligible for that level's pot.
Case contract
Input: {"bets": {player: total chips committed this hand}, "folded": [players]}. Build pots by layering at each distinct live (non-folded) commitment level, main pot first. Each layer takes from every player (folded ones included) the part of their commitment between the previous and current level; eligible players are the live players committed at least to the level, sorted. Folded chips above the top live level go to the last pot. Return [{"amount", "eligible"}].
Why this case matters
Side-pot construction decides which all-in players can win which chips.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| single all-in | [{"amount": 150, "eligible": ["a", "c"]}, {"amount": 100, "eligible": []}] | [{"amount": 150, "eligible": ["a", "b", "c"]}, {"amount": 100, "eligible": ["a", "c"]}] | 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 ↗