Ask the same two questions the same way everywhere #112

Closed
jheaps wants to merge 1 commits from fix/casino-holdem-one-stack-rule into fix/casino-holdem-default-stack-buyin
Owner

The round before this found the bank check and the standings reading a seat's own stack where the felt reads the table's starting stack — two parts of the tool disagreeing about how much money was on the table. That was worth a sweep, and the sweep found more.

The colour-up panel had the same fault. It's the panel that says "count out 2×$100 for this player", and on a table opened the ordinary way — a starting stack and some names — it showed nothing at all. The one table where every stack is a round number made of the largest chips there are was the table it had nothing to say about.

The other question — "is anybody in this chair?" — existed in four spellings: in the seat count, twice in the seat menu, in the waiting list, and twice more in the state module. Three looked at name, chips and cash; one also looked at a hand being dealt. A chair that counts as occupied for one and empty for another is how somebody's chips get given away — measured, a seat marked in-hand with no name and no stack yet was on offer to the next person in the waiting queue, on top of whoever was already playing it.

Both questions now have one implementation and one name:

"What is this seat holding?"   HoldemState.chipsHeldBy
"Is anybody in this chair?"    HoldemState.seatInPlay

Validated

  • In the browser on a starting-stack table: the colour-up panel now lists Ann — $200 / 2×$100, and so on, where it was empty; standings and bank both read $600.
  • 156 audits across 13 viewports, mouse and thumb, with the colour-up panel populated, a waiting list and an empty chair's menu open: clean, no console errors.
  • 10 new tests, suite at 565, 0 failures — including one that pins the bank check, the standings and the settle-up plan to the same total, and one that pins the seat count and the open seats to the same set of empty chairs. The occupancy test was cut back to its old three-part form on purpose to confirm the waiting-list case fails.
The round before this found the bank check and the standings reading a seat's own stack where the felt reads the table's **starting** stack — two parts of the tool disagreeing about how much money was on the table. That was worth a sweep, and the sweep found more. **The colour-up panel had the same fault.** It's the panel that says *"count out 2×$100 for this player"*, and on a table opened the ordinary way — a starting stack and some names — it showed **nothing at all**. The one table where every stack is a round number made of the largest chips there are was the table it had nothing to say about. **The other question — "is anybody in this chair?" — existed in four spellings**: in the seat count, twice in the seat menu, in the waiting list, and twice more in the state module. Three looked at name, chips and cash; one also looked at a hand being dealt. A chair that counts as occupied for one and empty for another is how somebody's chips get given away — measured, **a seat marked in-hand with no name and no stack yet was on offer to the next person in the waiting queue**, on top of whoever was already playing it. Both questions now have one implementation and one name: ``` "What is this seat holding?" HoldemState.chipsHeldBy "Is anybody in this chair?" HoldemState.seatInPlay ``` ### Validated - In the browser on a starting-stack table: the colour-up panel now lists **Ann — $200 / 2×$100**, and so on, where it was empty; standings and bank both read $600. - 156 audits across 13 viewports, mouse and thumb, with the colour-up panel populated, a waiting list and an empty chair's menu open: clean, no console errors. - 10 new tests, suite at **565, 0 failures** — including one that pins the bank check, the standings and the settle-up plan to the same total, and one that pins the seat count and the open seats to the same set of empty chairs. The occupancy test was cut back to its old three-part form on purpose to confirm the waiting-list case fails.
jheaps added 1 commit 2026-09-02 09:05:59 -06:00
The round before this found the bank check and the standings reading a seat's own
stack where the felt reads the table's starting stack — two parts of the tool
disagreeing about how much money was on the table. That was worth a sweep, and
the sweep found more.

The colour-up panel had the same fault. It is the panel that says "count out
2×$100 for this player", and on a table opened the ordinary way — a starting
stack and some names — it showed nothing at all. The one table where every stack
is a round number made of the largest chips there are was the table it had
nothing to say about.

The other question, "is anybody in this chair", existed in four spellings: in the
seat count, in the seat menu twice, in the waiting list, and twice more in the
state module. Three of them looked at name, chips and cash; one also looked at a
hand being dealt. A chair that counts as occupied for one and empty for another
is how somebody's chips get given away — measured, a seat marked in hand with no
name and no stack yet was on offer to the next person in the waiting queue, on
top of whoever was already playing it.

Both questions now have one implementation and one name:

    "What is this seat holding?"   HoldemState.chipsHeldBy
    "Is anybody in this chair?"    HoldemState.seatInPlay

10 new tests, including one that pins the bank check, the standings and the
settle-up plan to the same total, and one that pins the seat count and the open
seats to the same set of empty chairs. The occupancy test was cut back to its old
three-part form on purpose to confirm the waiting-list case fails.

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:58:08 -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#112