Put bets on the felt as chips instead of numbers in a box #29

Merged
jheaps merged 1 commits from feature/casino-holdem-bet-chips into feature/casino-holdem-sidebar-polish 2026-08-31 23:35:29 -06:00
Owner

Visual polish on the table, with a readability bug hiding inside it.

The seat puck showed a green figure that meant "what this player just bet" during a street and "what theyve put in this hand" between streets — two different numbers wearing the same badge, sitting directly above their stack size. Easy to misread, and nothing on the table looked like money.

  • Bets now sit on the felt between their player and the pot, as a chip coloured by the largest denomination in the chip legend that fits: a $30 bet is green against a $25 chip, a $2 bet is white, a $100 bet is black.
  • When a street closes the chips come off the felt and the pot keeps the money — the way a dealer sweeps them in.
  • The pucks figure now always means one thing: this players total for the hand.

The phone needed a different answer, and I measured rather than guessed

My first attempt put the bet ring on its own full-size layer; on a phone the chips ended up tucked behind the pucks. Pulling the ring inwards then put them on top of the pot badge. So I swept every radius from 16 to 34 at 390px and measured collision area against both the seats and the pot badge:

radius seat overlap pot overlap
18 81px² 512px²
21 213px² 268px²
27 604px² 0

No radius is collision-free — the felt has no room for a third ring between six pucks and the pot at that size. So on a narrow screen the bet clings to its own puck instead, on whichever side faces the middle of the table.

Validation (Playwright, headed)

  • Chip colours match the legend: $1 and $2 white, $25/$30 green, $100 black — read off the rendered elements.
  • The street transition preserves money: with three $25 bets on the felt and $10 already in from each player, closing the street took the chips to zero, left the pot at $135, and held every puck total steady at $35.
  • Zero collisions on both layouts: at 1280px the chips sit on the ring with 0px² overlap against seats and pot; at 390px they anchor to their puck with 0px² against any other puck and 0px² against the pot, all inside the table.
  • No console errors.

Based on feature/casino-holdem-sidebar-polish (PR #28) — merge order #22 → #23 → #24 → #25 → #26 → #27 → #28 → this.

Visual polish on the table, with a readability bug hiding inside it. The seat puck showed a green figure that meant **"what this player just bet"** during a street and **"what theyve put in this hand"** between streets — two different numbers wearing the same badge, sitting directly above their stack size. Easy to misread, and nothing on the table looked like money. - **Bets now sit on the felt** between their player and the pot, as a chip **coloured by the largest denomination in the chip legend that fits**: a $30 bet is green against a $25 chip, a $2 bet is white, a $100 bet is black. - **When a street closes the chips come off the felt** and the pot keeps the money — the way a dealer sweeps them in. - **The pucks figure now always means one thing**: this players total for the hand. ## The phone needed a different answer, and I measured rather than guessed My first attempt put the bet ring on its own full-size layer; on a phone the chips ended up tucked behind the pucks. Pulling the ring inwards then put them on top of the pot badge. So I swept every radius from 16 to 34 at 390px and measured collision area against both the seats and the pot badge: | radius | seat overlap | pot overlap | |---|---|---| | 18 | 81px² | 512px² | | 21 | 213px² | 268px² | | 27 | 604px² | 0 | **No radius is collision-free** — the felt has no room for a third ring between six pucks and the pot at that size. So on a narrow screen the bet clings to its own puck instead, on whichever side faces the middle of the table. ## Validation (Playwright, headed) - **Chip colours match the legend**: $1 and $2 white, $25/$30 green, $100 black — read off the rendered elements. - **The street transition preserves money**: with three $25 bets on the felt and $10 already in from each player, closing the street took the chips to zero, left the pot at $135, and held every puck total steady at $35. - **Zero collisions on both layouts**: at 1280px the chips sit on the ring with 0px² overlap against seats and pot; at 390px they anchor to their puck with 0px² against any *other* puck and 0px² against the pot, all inside the table. - No console errors. Based on `feature/casino-holdem-sidebar-polish` (PR #28) — merge order **#22 → #23 → #24 → #25 → #26 → #27 → #28 → this**.
jheaps added 1 commit 2026-08-31 23:25:00 -06:00
The seat puck showed a green figure that meant "what this player just bet"
during a street and "what they've put in this hand" between streets — two
different numbers wearing the same badge, sitting directly above their stack
size. Easy to misread, and nothing on the table looked like money.

Bets now sit on the felt between their player and the pot, as a chip coloured
by the largest denomination in the chip legend that fits the amount: a $30 bet
shows green against a $25 chip, a $2 bet shows white. When a street closes the
chips come off the felt and the pot badge keeps the money, the way they'd be
swept in. The puck's figure now always means the same thing — this player's
total for the hand.

On a phone the bet clings to its own puck instead of sitting on its own ring.
That isn't a preference: sweeping every radius between the seat ring and the
pot badge at 390px showed each one collides with either the pucks or the pot,
because the felt has no room for a third ring at that size.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015bnp7xKUPFFSpwkYNFaPgb
jheaps merged commit b563a56563 into feature/casino-holdem-sidebar-polish 2026-08-31 23:35:29 -06:00
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#29