Skip to content

blackjack: stacked split hands, dealer-flanking rules, Perfect Pairs#80

Merged
BCook98 merged 1 commit into
mainfrom
blackjack-split-pairs
Jun 29, 2026
Merged

blackjack: stacked split hands, dealer-flanking rules, Perfect Pairs#80
BCook98 merged 1 commit into
mainfrom
blackjack-split-pairs

Conversation

@BCook98

@BCook98 BCook98 commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

What

Three changes to games/bcook/blackjack, plus a UX clarity follow-up:

1. Split hands no longer hide their cards

The 15-col seat slot can't fit two card boxes side by side, so the old layout collapsed a seat's 2nd+ split hands to a bare + — you couldn't see the cards, and the turn would advance to a hand you couldn't see (the "controls feel broken" report). Split seats now render one compact line per hand, stacked, with the hand on turn marked (, active colour) and busts in red. Single (un-split) hands keep the full card box.

2. Rules moved out of the middle of the felt

~ blackjack pays 3:2 · dealer stands on 17 ~ was a banner across mid-felt. It's now split to flank the DEALER label (blackjack pays 3:2dealer stands on 17), as subtle signage, freeing the centre for cards.

3. Perfect Pairs side bet

A side bet on your first two cards being a pair:

  • Adjustable on the Left/Right betting axis (tiers 0/10/25/50/100); Up/Down still drives the main bet.
  • Pays 25:1 perfect (same rank+suit) / 12:1 colored (same rank+colour) / 6:1 mixed (same rank, diff colour).
  • Resolved at the deal and folded into the round's net so the WIN/LOSE summary reconciles with chips.

Whose-bet-is-whose clarity

Each seat's bet and +pairs N are grouped on adjacent rows as one block, and the side-bet line carries the placing player's character tile so it reads by face, not just column.

Tests

  • New unit tests: perfectPairsOutcome, pairsCreditFor.
  • New render/room tests: split seat shows every hand's cards (regression guard), rules flank the dealer, betting Left/Right adjusts + clamps the side bet, deal resolves the side bet, settle folds it into net, the pairs line carries the character tile.
  • smoke.yaml reseeded (58) to walk: relocated signage → side-bet placement → both seats winning Perfect Pairs → a split (stacked-hands shot) → payout/ready.
  • go test ./... green, go vet clean.

🤖 Generated with Claude Code

- Split hands now render as stacked, compact one-line-per-hand entries
  with the hand on turn marked, instead of collapsing later hands to a
  bare "+". Fixes split cards being hidden and acting on a hand you can
  not see.
- Move the table rules out of the mid-felt banner to flank the DEALER
  label (left/right), keeping the centre of the felt clear for cards.
- Add a Perfect Pairs side bet: adjustable on the Left/Right betting
  axis (tiers 0/10/25/50/100), paying 25:1 perfect / 12:1 colored /
  6:1 mixed. Resolved at the deal and folded into the round net.
- Make whose-bet-is-whose unambiguous: each seat's bet and "+pairs N"
  form one contiguous block, and the side-bet line carries the placing
  player's character tile.

smoke.yaml reseeded (58) to exercise the side bet, both pairs wins, and
a split. New unit and render tests cover the pairs evaluation/credit,
the betting nav, the stacked split layout, and the relocated rules.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Smoke screens

Deterministic scripted screens for c2c55a8d86447da4076e4927f12976b7fafca22a (what is this?)

games/bcook/blackjack — 14 screens

01-bet.seat0
01-bet.seat0

01-bet.seat1
01-bet.seat1

02-sidebet.seat0
02-sidebet.seat0

02-sidebet.seat1
02-sidebet.seat1

03-dealt.seat0
03-dealt.seat0

03-dealt.seat1
03-dealt.seat1

04-split.seat0
04-split.seat0

04-split.seat1
04-split.seat1

05-payout.seat0
05-payout.seat0

05-payout.seat1
05-payout.seat1

06-ready.seat0
06-ready.seat0

06-ready.seat1
06-ready.seat1

07-next.seat0
07-next.seat0

07-next.seat1
07-next.seat1

@BCook98 BCook98 merged commit ae69e30 into main Jun 29, 2026
3 checks passed
@BCook98 BCook98 deleted the blackjack-split-pairs branch June 29, 2026 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant