Pick hole cards from a grid instead of typing them #22

Merged
jheaps merged 1 commits from feature/casino-holdem-card-picker into feature/casino-holdem-live-betting 2026-08-31 23:34:00 -06:00
Owner

Second slice of the speed-of-dealing work: select cards instead of typing them.

Typing AH into a two-character box is fine at a desk and miserable at a table — it needs a keyboard, it accepts nonsense like ZZ, and it happily deals the same card to two players.

The two card fields become face-up card slots. Tapping one opens a 52-card grid (four suit columns, thirteen rank rows) — one tap per card. Picking the first card moves straight on to the second, because a dealer picking hole cards is always picking two. Cards already dealt elsewhere at the table are greyed out and name who holds them, so a duplicate is visibly out of play rather than silently accepted.

Cards are still stored as the same two plain characters everything has always read; the suit only becomes a symbol on its way to a human. That formatting is now shared, so the table pucks, seat editor, pot wizard, hand history and CSV all say A♥ K♦ instead of three of them saying AH KD.

Validation (Playwright, headed)

First round validated in a real browser window rather than headless.

  • The two-tap flow through real clicks: tapped the slot → grid opened with exactly 52 cells → tapped A♥ → it saved, the picker stayed open and advanced to card 2 with A♥ now greyed out → tapped K♦ → saved and closed. Stored as ["AH","KD"], displayed as A♥ K♦ in the editor and on the table puck, both correctly red.
  • Duplicate prevention: with two seats holding cards, exactly the four dealt cards were disabled, each titled "Already dealt to ".
  • Clear empties the active slot; empty slots render a + placeholder rather than going blank.
  • Labels flow through: played a hand to showdown and confirmed the wizard ("Ann (A♥ K♦) — up to $2.00"), the payout summary, the hand-history row and the CSV line all carry the symbols.
  • No console errors; no horizontal overflow at 390px or 1280px.

Based on feature/casino-holdem-live-betting (PR #21) — both touch the seat editor template and wireSeatFields, so branching off master would have guaranteed a conflict for whichever landed second. Merge #21 first, then this.

Still to come

Double-tap / long-press gestures on the seat pucks are the remaining item from your list.

Second slice of the speed-of-dealing work: **select cards instead of typing them.** Typing `AH` into a two-character box is fine at a desk and miserable at a table — it needs a keyboard, it accepts nonsense like `ZZ`, and it happily deals the same card to two players. The two card fields become **face-up card slots**. Tapping one opens a **52-card grid** (four suit columns, thirteen rank rows) — **one tap per card**. Picking the first card moves straight on to the second, because a dealer picking hole cards is always picking two. **Cards already dealt elsewhere at the table are greyed out** and name who holds them, so a duplicate is visibly out of play rather than silently accepted. Cards are still stored as the same two plain characters everything has always read; the suit only becomes a symbol on its way to a human. That formatting is now shared, so the table pucks, seat editor, pot wizard, hand history and CSV all say `A♥ K♦` instead of three of them saying `AH KD`. ## Validation (Playwright, headed) First round validated in a real browser window rather than headless. - **The two-tap flow through real clicks**: tapped the slot → grid opened with exactly **52 cells** → tapped A♥ → it saved, the picker **stayed open and advanced to card 2** with A♥ now greyed out → tapped K♦ → saved and closed. Stored as `["AH","KD"]`, displayed as A♥ K♦ in the editor and on the table puck, both correctly red. - **Duplicate prevention**: with two seats holding cards, exactly the four dealt cards were disabled, each titled "Already dealt to <player>". - **Clear** empties the active slot; empty slots render a + placeholder rather than going blank. - **Labels flow through**: played a hand to showdown and confirmed the wizard ("Ann (A♥ K♦) — up to $2.00"), the payout summary, the hand-history row and the CSV line all carry the symbols. - No console errors; no horizontal overflow at 390px or 1280px. Based on `feature/casino-holdem-live-betting` (PR #21) — both touch the seat editor template and `wireSeatFields`, so branching off master would have guaranteed a conflict for whichever landed second. Merge #21 first, then this. ## Still to come Double-tap / long-press gestures on the seat pucks are the remaining item from your list.
jheaps added 1 commit 2026-08-31 21:33:03 -06:00
Typing "AH" into a two-character box is fine at a desk and miserable at a table:
it needs a keyboard, it accepts nonsense like "ZZ", and it happily deals the same
card to two players.

The two card fields become face-up card slots. Tapping one opens a 52-card grid
— four suit columns, thirteen rank rows, one tap per card — and picking the first
card moves straight on to the second, because a dealer picking hole cards is
always picking two. Cards already dealt elsewhere at the table are greyed out and
say who has them, so a duplicate is visibly out of play rather than silently
accepted.

Cards are still stored as the same two plain characters everything has always
read; the suit only becomes a symbol on its way to a human. That formatting is
now shared, so the table pucks, the seat editor, the pot wizard, the hand history
and the CSV all say A♥ K♦ rather than three of them saying AH KD.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015bnp7xKUPFFSpwkYNFaPgb
jheaps merged commit 71542b5080 into feature/casino-holdem-live-betting 2026-08-31 23:34:00 -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#22