Pass the button to the next player, not the next chair #39

Closed
jheaps wants to merge 0 commits from feature/casino-holdem-button-moves into master
Owner

Third in the run of rules checks, and a sibling of #37 — same root cause, different symptom: the tool counts chairs where it should count players.

The button moved one seat per hand regardless of whether anyone was sitting there. At a ten-seat table with four players — an ordinary home game — it spent five hands out of eight on an empty chair.

That reads as untidy, but the real problem is fairness. Position and the blinds are meant to come round to each player at the same rate. Rotating past empty chairs breaks that: a player with three empty seats to their right takes the button far less often than one sitting in a cluster, while both pay blinds every time the rotation reaches them. In a game where people are settling up at the end, that is a real complaint waiting to happen.

The button now skips to the next seat actually dealt in.

Validation (Playwright, headed)

  • Four players in ten chairs: the button now visits seat0 → seat3 → seat4 → seat8 and repeats — never an empty chair, where before it landed on one five times in eight hands.
  • Fairness measured, not asserted: over twelve hands each of the four players takes the button exactly three times.
  • Heads-up at a nine-handed table alternates between the two players; a full table is unchanged, still rotating one seat at a time.
  • Driven through the real UI as well: pressing Next Hand walks the button Ann → Ben → Cass → Ann across an eight-seat table with three players, never landing on an empty seat.
  • No console errors.

Checked against the other open work: git merge-tree reports zero conflicts against both #37 and #38, which touch neighbouring code. This can merge in any order relative to them.

Third in the run of rules checks, and a sibling of #37 — same root cause, different symptom: **the tool counts chairs where it should count players.** The button moved one seat per hand regardless of whether anyone was sitting there. At a ten-seat table with four players — an ordinary home game — it spent **five hands out of eight on an empty chair**. That reads as untidy, but the real problem is **fairness**. Position and the blinds are meant to come round to each player at the same rate. Rotating past empty chairs breaks that: a player with three empty seats to their right takes the button far less often than one sitting in a cluster, while both pay blinds every time the rotation reaches them. In a game where people are settling up at the end, that is a real complaint waiting to happen. The button now skips to the next seat actually dealt in. ## Validation (Playwright, headed) - **Four players in ten chairs**: the button now visits `seat0 → seat3 → seat4 → seat8` and repeats — **never an empty chair**, where before it landed on one five times in eight hands. - **Fairness measured, not asserted**: over twelve hands each of the four players takes the button exactly **three** times. - **Heads-up at a nine-handed table** alternates between the two players; **a full table is unchanged**, still rotating one seat at a time. - Driven through the real UI as well: pressing Next Hand walks the button Ann → Ben → Cass → Ann across an eight-seat table with three players, never landing on an empty seat. - No console errors. **Checked against the other open work**: `git merge-tree` reports **zero conflicts** against both #37 and #38, which touch neighbouring code. This can merge in any order relative to them.
jheaps added 1 commit 2026-09-01 01:50:37 -06:00
The button moved one seat per hand regardless of whether anyone was sitting
there. At a ten-seat table with four players — an ordinary home game — it spent
five hands out of eight on an empty chair.

That reads as untidy, but the real problem is fairness. Position and the blinds
are meant to come round to each player at the same rate. Rotating past empty
chairs breaks that: a player with three empty seats to their right takes the
button far less often than one sitting in a cluster, while both pay blinds every
time the rotation reaches them.

The button now skips to the next seat that's actually dealt in, so with four
players it visits those four in turn and each takes it once every four hands.

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:18 -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#39