Show the banker the amount to count out, not just whether the player is up #93

Closed
jheaps wants to merge 1 commits from fix/casino-holdem-chips-to-count-out into fix/casino-holdem-first-buy-in
Owner

The standings had a column headed Cash out and it did not hold an amount to pay. It held the difference against the player's buy-in. Measured on a table where Ann bought in for $200 and sits behind $340:

PLAYER NET CASH OUT
Ann $0 +$140

She is handed $340. The column called "Cash out" says $140, under a heading that invites reading it as the payout, at the exact moment somebody is counting money onto the table. The number a banker's hands actually follow — what the player is holding — was computed all along, written to the CSV, and never shown on screen.

What changed

Three columns, saying what they are:

PLAYER CHIPS UP/DOWN
Ann $340 +$140
Ben $150 −$50
Cal $60 −$140
  • Chips is a plain amount, never signed, because it is a quantity of money to hand over. It carries the visual weight.
  • Up/down keeps the sign and the colour, because it is a result. The two differ by exactly the buy-in, asserted in a test rather than assumed.
  • Chips counts what is out in the middle for the hand in progress as still theirs, for the same reason up/down does: the panel is read mid-hand constantly, and a stack that drops by the size of a bet looks like money going missing.

What was given up. Net — won less paid in, from the hand log — comes off the screen to make room, and I'd rather say that plainly than bury it. It is the weakest of the three: it only moves when a pot is resolved through the wizard, so at a table where the dealer settles pots by hand it reads $0 all night beside two columns that don't, and up/down already answers "how are they doing". It stays in the CSV export, which loses nothing. (Correction to an earlier note of mine: I first said the wide layout never renders. Measured across 390-3440px, it does — at 768px the sidebar becomes a full-width panel, the container reaches 41rem and all six columns show. It is only unreachable on desktop, where the sidebar is pinned at 320px. So on a tablet-width layout Net is still on screen; on a phone or a desktop it is not.)

Verification

4 new tests in tests/holdem/bankAudit.test.js: chips-in-front is what they hold rather than what they're up, a losing player still has chips to be handed, chips committed mid-hand are counted as theirs, and across a mixed table the two columns always differ by exactly the buy-in. Suite at 370 tests, 0 failures. Nothing else consumes the removed rendering; chipsInFront is additive, and settle-up and the bank check still read cashPosition.

Playwright MCP at 390/1280/1900 on a table of four with mixed results: header and every row read Player · Chips · Up/down with correct values at all three, no column overflow, no sideways scroll, contrast and layout audit clean, no console errors.

Stacked on fix/casino-holdem-first-buy-in.

🤖 Generated with Claude Code

https://claude.ai/code/session_015bnp7xKUPFFSpwkYNFaPgb

The standings had a column headed **Cash out** and it did not hold an amount to pay. It held the difference against the player's buy-in. Measured on a table where Ann bought in for $200 and sits behind $340: | PLAYER | NET | CASH OUT | |---|---|---| | Ann | $0 | **+$140** | She is handed **$340**. The column called "Cash out" says $140, under a heading that invites reading it as the payout, at the exact moment somebody is counting money onto the table. The number a banker's hands actually follow — what the player is holding — was computed all along, written to the CSV, and never shown on screen. **What changed** Three columns, saying what they are: | PLAYER | CHIPS | UP/DOWN | |---|---|---| | Ann | **$340** | +$140 | | Ben | $150 | −$50 | | Cal | $60 | −$140 | - **Chips** is a plain amount, never signed, because it is a quantity of money to hand over. It carries the visual weight. - **Up/down** keeps the sign and the colour, because it is a result. The two differ by exactly the buy-in, asserted in a test rather than assumed. - Chips counts what is out in the middle for the hand in progress as still theirs, for the same reason up/down does: the panel is read mid-hand constantly, and a stack that drops by the size of a bet looks like money going missing. **What was given up.** **Net** — won less paid in, from the hand log — comes off the screen to make room, and I'd rather say that plainly than bury it. It is the weakest of the three: it only moves when a pot is resolved through the wizard, so at a table where the dealer settles pots by hand it reads $0 all night beside two columns that don't, and up/down already answers "how are they doing". It stays in the CSV export, which loses nothing. (Correction to an earlier note of mine: I first said the wide layout never renders. Measured across 390-3440px, it does — at 768px the sidebar becomes a full-width panel, the container reaches 41rem and all six columns show. It is only unreachable on desktop, where the sidebar is pinned at 320px. So on a tablet-width layout Net is still on screen; on a phone or a desktop it is not.) **Verification** 4 new tests in `tests/holdem/bankAudit.test.js`: chips-in-front is what they hold rather than what they're up, a losing player still has chips to be handed, chips committed mid-hand are counted as theirs, and across a mixed table the two columns always differ by exactly the buy-in. Suite at 370 tests, 0 failures. Nothing else consumes the removed rendering; `chipsInFront` is additive, and settle-up and the bank check still read `cashPosition`. Playwright MCP at 390/1280/1900 on a table of four with mixed results: header and every row read `Player · Chips · Up/down` with correct values at all three, no column overflow, no sideways scroll, contrast and layout audit clean, no console errors. Stacked on `fix/casino-holdem-first-buy-in`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_015bnp7xKUPFFSpwkYNFaPgb
jheaps added 1 commit 2026-09-01 23:36:43 -06:00
The standings had a column headed "Cash out" and it did not hold an amount to pay.
It held the difference against the player's buy-in. Measured on a table where Ann
bought in for $200 and sits behind $340:

    PLAYER   NET   CASH OUT
    Ann      $0     +$140

She is handed $340. The column called "Cash out" says $140, under a heading that
invites reading it as the payout, at the exact moment somebody is counting money onto
the table. The number a banker's hands actually follow — what the player is holding —
was computed all along and written to the CSV, and never shown on screen.

Three columns now, and they say what they are: Player, Chips, Up/down. Chips is a
plain amount and never signed, because it is a quantity of money to hand over. Up/down
keeps the sign and the colour, because it is a result. The two differ by exactly the
buy-in, which is asserted rather than assumed.

Chips counts what is out in the middle for the hand in progress as still theirs, for
the same reason the up/down figure does: the panel is read mid-hand constantly and a
stack that drops by the size of a bet looks like money going missing.

Net — won less paid in, from the hand log — comes off the screen to make room. It is
the weakest of the three: it only moves when a pot is resolved through the wizard, so
at a table where the dealer settles pots by hand it reads $0 all night beside two
columns that don't, and up/down already answers "how are they doing". It stays in the
CSV export, which loses nothing.

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:01 -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#93