Keep the big blind moving one player at a time when somebody leaves out of the blinds #87

Closed
jheaps wants to merge 1 commits from fix/casino-holdem-dead-button into fix/casino-holdem-discarded-pot
Owner

Passing the button to the next player is right until a chair between the button and the blinds empties. Then it pulls the whole blind order forward a place. Measured four-handed — button on Ben, blinds Cal and Dee — with Cal cashing out between hands:

button small blind big blind
before Ben Cal Dee
tool Dee Ann Ben
correct dead button on Cal's chair Dee Ann

Ann is never asked for the big blind she owes, and Ben pays one a full orbit early. That is a real big blind out of a real stack, and it happens every time somebody stands up out of the blinds — which in a cash game is constantly. It is also the kind of thing the dealer gets blamed for, because the tool is what everyone at the table is reading position off.

What changed

The dead button rule holds the rotation to the seats for one hand instead of to the players. The button follows the small blind round, which at a table with nobody missing is the same next-player-along it always was; when that player has gone the button rests on their empty chair for a hand, and when the big blind has gone no small blind is posted. Either way the big blind advances exactly one player, which is the whole point of it.

  • Worked out from who actually posted last hand (postedBlinds, recorded where the blinds go in) rather than from the seating as it stands — by the time the question is asked, the people it turns on are the ones who have left, so the answer can't be read off the table any more.
  • Exempt: heads-up (the button is the small blind, so there is no position to leave dead), a table too sparse to have a rotation to hold to, a fresh table, a hand that was never dealt, and a dealer who moves the button or names a blind by hand — all of those fall back to the ordinary pass, unchanged.
  • Both dead positions are said out loud rather than left looking like a fault. The deal prompt reads "No small blind this hand, Ann posts $2" with a line explaining why, and the dead button goes hollow and dashed so the felt agrees with the words instead of looking like a button that has drifted and wants dragging back.
  • Old saves migrate to nothing dead and rotate the ordinary way.

Verification

15 new tests in tests/holdem/deadButton.test.js covering both departures, the untouched ordinary rotation (including a thin 3-in-9 table, where holding to chairs would post blinds to nobody), the exemptions, migration, and that a one-blind hand moves exactly one big blind out of exactly one stack. Suite at 305 tests, 0 failures.

Playwright MCP: dealt, walked the small blind off the table, pressed Next Hand — toast reads "dead button on seat 3", the button renders dashed on the empty chair, Dee takes the small blind badge and Ann the big, and dealing puts $1 and $2 in from those two with action to Ben. Repeated with the big blind leaving instead: no small blind badge anywhere, prompt explains it, deal posts $2 alone at a current bet of $2. Checked at 390/768/1280 — dead button on screen and dashed at every size, no prompt overflow, no sideways scroll, contrast and layout audit clean, no console errors.

Stacked on fix/casino-holdem-discarded-pot.

🤖 Generated with Claude Code

https://claude.ai/code/session_015bnp7xKUPFFSpwkYNFaPgb

Passing the button to the next player is right until a chair between the button and the blinds empties. Then it pulls the whole blind order forward a place. Measured four-handed — button on Ben, blinds Cal and Dee — with Cal cashing out between hands: | | button | small blind | big blind | |---|---|---|---| | before | Ben | Cal | Dee | | tool | Dee | **Ann** | **Ben** | | correct | dead button on Cal's chair | Dee | **Ann** | Ann is never asked for the big blind she owes, and Ben pays one a full orbit early. That is a real big blind out of a real stack, and it happens every time somebody stands up out of the blinds — which in a cash game is constantly. It is also the kind of thing the dealer gets blamed for, because the tool is what everyone at the table is reading position off. **What changed** The dead button rule holds the rotation to the seats for one hand instead of to the players. The button follows the small blind round, which at a table with nobody missing is the same next-player-along it always was; when that player has gone the button rests on their empty chair for a hand, and when the big blind has gone no small blind is posted. Either way the big blind advances exactly one player, which is the whole point of it. - Worked out from who actually posted last hand (`postedBlinds`, recorded where the blinds go in) rather than from the seating as it stands — by the time the question is asked, the people it turns on are the ones who have left, so the answer can't be read off the table any more. - **Exempt**: heads-up (the button *is* the small blind, so there is no position to leave dead), a table too sparse to have a rotation to hold to, a fresh table, a hand that was never dealt, and a dealer who moves the button or names a blind by hand — all of those fall back to the ordinary pass, unchanged. - Both dead positions are **said out loud** rather than left looking like a fault. The deal prompt reads *"No small blind this hand, Ann posts $2"* with a line explaining why, and the dead button goes hollow and dashed so the felt agrees with the words instead of looking like a button that has drifted and wants dragging back. - Old saves migrate to nothing dead and rotate the ordinary way. **Verification** 15 new tests in `tests/holdem/deadButton.test.js` covering both departures, the untouched ordinary rotation (including a thin 3-in-9 table, where holding to chairs would post blinds to nobody), the exemptions, migration, and that a one-blind hand moves exactly one big blind out of exactly one stack. Suite at 305 tests, 0 failures. Playwright MCP: dealt, walked the small blind off the table, pressed Next Hand — toast reads *"dead button on seat 3"*, the button renders dashed on the empty chair, Dee takes the small blind badge and Ann the big, and dealing puts $1 and $2 in from those two with action to Ben. Repeated with the big blind leaving instead: no small blind badge anywhere, prompt explains it, deal posts $2 alone at a current bet of $2. Checked at 390/768/1280 — dead button on screen and dashed at every size, no prompt overflow, no sideways scroll, contrast and layout audit clean, no console errors. Stacked on `fix/casino-holdem-discarded-pot`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_015bnp7xKUPFFSpwkYNFaPgb
jheaps added 1 commit 2026-09-01 22:05:27 -06:00
Passing the button to the next player is right until a chair between the button and
the blinds empties. Then it pulls the whole blind order forward a place. Measured,
four-handed, button on Ben, blinds Cal and Dee, with Cal cashing out:

    tool:    button Dee, small blind Ann, big blind Ben
    correct: dead button on Cal's chair, small blind Dee, big blind Ann

Ann is never asked for the big blind she owes, and Ben pays one a full orbit early.
That is a real big blind out of a real stack, and it happens every time somebody
stands up out of the blinds — which in a cash game is constantly. It is also the
kind of thing the dealer gets blamed for, because the tool is the thing everyone at
the table is reading position off.

The dead button rule holds the rotation to the seats for one hand instead of to the
players. The button follows the small blind round, which at a table with nobody
missing is the same next-player-along it always was; when that player has gone the
button rests on their empty chair for a hand, and when the big blind has gone no
small blind is posted. Either way the big blind advances exactly one player, which
is the whole point of it.

Worked out from who actually posted last hand rather than from the seating as it
stands, because by the time the question is asked the people it turns on are the
ones who have left. Heads-up is exempt — the button is the small blind there and
there is no position to leave dead — as is a table too sparse to have a rotation to
hold to, and a dealer who moves the button or names a blind by hand overrules it.

Both dead positions are said out loud rather than left to look like a fault: the
deal prompt explains them in a sentence, and the dead button goes hollow and dashed
so the felt agrees with the words.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015bnp7xKUPFFSpwkYNFaPgb
jheaps closed this pull request 2026-09-02 09:57:58 -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#87