Skip to content

blackjack: bigger bet ladder, sticky backs, low-stack re-buy, doubled tag#83

Merged
BCook98 merged 1 commit into
mainfrom
blackjack-betting-fixes
Jul 2, 2026
Merged

blackjack: bigger bet ladder, sticky backs, low-stack re-buy, doubled tag#83
BCook98 merged 1 commit into
mainfrom
blackjack-betting-fixes

Conversation

@BCook98

@BCook98 BCook98 commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Four blackjack fixes/requests.

Changes

Low-stack re-buy — A seat is now staked back to the re-buy stack once it can no longer cover the minimum bet (chips < betTiers[0]), not only at zero. Previously a 1–9 chip stack was soft-locked in betting (Confirm requires chips >= 10) and never reached the re-buy path again.

Sticky behind bets — Behind / their-Perfect-Pairs bets now carry between rounds like the main bet and own pairs. carryBacks prunes backs on targets who left the table and clears last round's per-back result fields; clampBacks lowers carried stakes a thinned stack can no longer afford. A target who's still seated but sits a round out keeps their sticky back and just voids that round (existing behavior).

Bigger bet ladder — Main bets now climb 10 → 25 → 50 → 100 → 250 → 500 → 1000 → 2500 → 5000 → 10000 (the ×2.5/×2/×2 pattern repeated each decade). Perfect Pairs / behind side stakes extended to match so side action scales with the main bet.

Doubled indicator — A doubled hand now shows a DBL tag on its value line (single hand and stacked split), so onlookers can see who doubled down.

Testing

  • go test ./... — all pass (added TestRebuyWhenBelowMinimumBet, TestBehindBetsAreStickyAcrossRounds, TestStickyBackPrunedWhenTargetLeaves, TestDoubledHandTagged, TestDoubledHandRendersDBL; updated TestPairsSideBetLoopsOnP for the longer ladder).
  • Smoke harness (shellcade-kit smoke) — builds to wasm and plays through all 8 shots.

Note

startChips/rebuyChips remain 1000, so a fresh or re-bought player builds up to the new 2500+ tiers rather than starting there.

🤖 Generated with Claude Code

… tag

- Extend the main bet ladder to 10→25→50→100→250→500→1000→2500→5000→10000
  (the ×2.5/×2/×2 climb repeated each decade), and grow the Perfect Pairs /
  behind side stakes to match so side action can scale with the main bet.
- Re-buy a seat once it can no longer cover the minimum stake (chips <
  betTiers[0]), not only at zero — a 1–9 chip stack was soft-locked in betting
  (Confirm requires chips >= 10) and never reached the re-buy path again.
- Make behind / their-pairs bets sticky between rounds like the main bet and
  own pairs: carryBacks prunes backs on departed targets and clears last
  round's per-back results; clampBacks lowers carried stakes a thinned stack
  can no longer afford.
- Flag a doubled hand with a " DBL" tag on its value line (single hand and
  stacked split) so onlookers can see who doubled down.

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

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown

Smoke screens

Deterministic scripted screens for 856a1a6e7ec62f34bf7d335a85c027847969bd9b (what is this?)

games/bcook/blackjack — 16 screens

01-bet.seat0
01-bet.seat0

01-bet.seat1
01-bet.seat1

02-backing.seat0
02-backing.seat0

02-backing.seat1
02-backing.seat1

03-sidebet.seat0
03-sidebet.seat0

03-sidebet.seat1
03-sidebet.seat1

04-dealt.seat0
04-dealt.seat0

04-dealt.seat1
04-dealt.seat1

05-split.seat0
05-split.seat0

05-split.seat1
05-split.seat1

06-payout.seat0
06-payout.seat0

06-payout.seat1
06-payout.seat1

07-ready.seat0
07-ready.seat0

07-ready.seat1
07-ready.seat1

08-next.seat0
08-next.seat0

08-next.seat1
08-next.seat1

@BCook98 BCook98 merged commit 99174f7 into main Jul 2, 2026
3 checks passed
@BCook98 BCook98 deleted the blackjack-betting-fixes branch July 2, 2026 07:55
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