Let Quick Split handle the pot it used to send people away for #33

Closed
jheaps wants to merge 0 commits from feature/casino-quicksplit-side-pots into master
Owner

Branched from master, and touches no file that #30 or #32 touches — so this merges independently, in any order, with no chain.

Quick Split answered the easy half of the question and printed a footnote for the hard half: if somebody was all-in for less, go set up the full table. That is precisely the moment a dealer least wants to be setting up a table.

A second mode takes what each player put in and lists the main pot and each side pot with who can win it, plus anything uncalled that goes back. Rows can be marked folded, so dead money lands in the right pot without its owner being able to win it. A running On the table total lets the breakdown be checked against the chips actually in the middle.

It reuses the same pot maths as the full table rather than growing a second implementation — the two screens cannot drift apart, and Quick Split inherits the uncalled-bet and everyone-folded handling that was fixed in PR #24.

Validation (Playwright, headed)

  • The even mode is untouched — re-ran the original cases: $47/2/$1 → $23 each plus one odd chip; $100/3/$5 → $30 each plus two odd chips.
  • Textbook side pots: 50 / 100 / 200 → main $150 (P1, P2, P3), side $100 (P2, P3), side $100 (P3), $350 on the table.
  • Folding the short stack turns his $50 into dead money: main $250 winnable by P2 and P3 only, total still $350.
  • Uncalled overbet by a player who folds: main $120, $50 back to P3 — not a fourth pot nobody can win.
  • Everyone folded says to un-fold whoever should take it rather than inventing a payout.
  • 60 randomised tables driven through the real inputs: every chip entered is accounted for on screen, zero discrepancies.
  • Add/remove players works; removal is disabled at two.

One bug the screenshot caught: both modes controls were visible at once. These sections carry a display declaration, which outranks the browsers own [hidden] rule, so toggling hidden did nothing. Verified the fix by counting actually visible elements in each mode and back again — 4/0, then 0/2, then 4/0.

No console errors.

**Branched from `master`, and touches no file that #30 or #32 touches** — so this merges independently, in any order, with no chain. Quick Split answered the easy half of the question and printed a footnote for the hard half: *if somebody was all-in for less, go set up the full table.* That is precisely the moment a dealer least wants to be setting up a table. A second mode takes what each player put in and lists **the main pot and each side pot with who can win it**, plus anything **uncalled** that goes back. Rows can be marked **folded**, so dead money lands in the right pot without its owner being able to win it. A running **On the table** total lets the breakdown be checked against the chips actually in the middle. It **reuses the same pot maths as the full table** rather than growing a second implementation — the two screens cannot drift apart, and Quick Split inherits the uncalled-bet and everyone-folded handling that was fixed in PR #24. ## Validation (Playwright, headed) - **The even mode is untouched** — re-ran the original cases: $47/2/$1 → $23 each plus one odd chip; $100/3/$5 → $30 each plus two odd chips. - **Textbook side pots**: 50 / 100 / 200 → main $150 (P1, P2, P3), side $100 (P2, P3), side $100 (P3), $350 on the table. - **Folding the short stack** turns his $50 into dead money: main $250 winnable by P2 and P3 only, total still $350. - **Uncalled overbet** by a player who folds: main $120, **$50 back to P3** — not a fourth pot nobody can win. - **Everyone folded** says to un-fold whoever should take it rather than inventing a payout. - **60 randomised tables driven through the real inputs**: every chip entered is accounted for on screen, zero discrepancies. - Add/remove players works; removal is disabled at two. **One bug the screenshot caught**: both modes controls were visible at once. These sections carry a `display` declaration, which outranks the browsers own `[hidden]` rule, so toggling `hidden` did nothing. Verified the fix by counting *actually visible* elements in each mode and back again — 4/0, then 0/2, then 4/0. No console errors.
jheaps added 1 commit 2026-09-01 00:07:58 -06:00
Quick Split answered the easy half of the question and printed a footnote for
the hard half: if somebody was all-in for less, go set up the full table. That's
the moment a dealer least wants to be setting up a table.

A second mode takes what each player put in and lists the main pot and each side
pot with who can win it, plus anything uncalled that goes back. Rows can be
marked folded, so dead money lands in the right pot without its owner being able
to win it. The running total is shown so the breakdown can be checked against
the chips actually on the table.

It reuses the same pot maths as the full table rather than growing a second
implementation, which means the two screens can't drift apart and Quick Split
inherits the uncalled-bet and everyone-folded handling that was fixed there.

Also fixes hiding: these sections carry a `display` declaration, which outranks
the browser's own [hidden] rule, so toggling `hidden` on them did nothing and
both modes' controls showed at once.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015bnp7xKUPFFSpwkYNFaPgb
jheaps closed this pull request 2026-09-01 02:42:14 -06:00

Pull request closed

Please reopen this pull request to perform a merge.
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: jheaps/JoshHeaps.Net#33