Skip to content

Convert the 4 casino games to platform Credits (kit v2.16.0)#87

Merged
BCook98 merged 4 commits into
mainfrom
add-credits-economy-games
Jul 3, 2026
Merged

Convert the 4 casino games to platform Credits (kit v2.16.0)#87
BCook98 merged 4 commits into
mainfrom
add-credits-economy-games

Conversation

@BCook98

@BCook98 BCook98 commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

What

Converts blackjack, roulette, pokies, and scratchies from their own internal chip economies to the platform casino Credits ABI (kit v2.16.0). Each game now declares Kind=casino + MaxPayoutMultiplier + CtxFeatCredits, deletes its per-account KV/ScoreKeeper wallet, and wires every bet through svc.Credits.Wager/Settle/Balance — with one open stake per round, a single stake-inclusive Settle, Settle-on-leave/abandon so escrow never leaks, and in-game rebuy via svc.Credits.Buyback when a seat busts. All keep a peak-Credits leaderboard.

Game MaxPayoutMultiplier Top prize Notes
blackjack 26 Perfect Pairs 25:1 → 26× side bets/double/split fold onto one grossThisRound, settled once
roulette 36 straight-up 35:1 → 36× whole board = one Wager at spin-lock; pre-lock placement is local-only
pokies 10000 capped gamble/free-spin Lifecycle Resident→Resumable (casino+resident unsupported); gamble MaxWin + free-spin accumulation made stake-relative, gross capped at bet×10000
scratchies 30000 $10 cash-explosion 30,000× one outcome drawn at purchase; one Wager + one gross Settle per ticket

Money-path discipline

Each conversion was authored by an opus agent and then independently adversarially reviewed by a second opus agent (Settle-without-Wager, double-Settle, leave/abandon leaks, one-stake-per-round, multiplier coverage, full wallet removal, rebuy refusal handling). No CONFIRMED or PLAUSIBLE money-path defects in any of the four. I then re-verified every game myself:

  • go build ./... && go vet ./... && go test ./... — PASS (all 4)
  • tinygo build -opt=1 -gc=conservative -target wasip1 -buildmode=c-shared — PASS (all 4)
  • shellcade-kit@v2.16.0 check --require-leaderboard .check: OK (all 4)

Requires

kit v2.16.0 (released) for the credits_buyback host function, and the platform-side in-game buyback + daily rebuy limit (shellcade #206, merged). Real rebuys work once #206 is deployed; conformance passes now against the in-tree kittest double.

pokies note: the always-on walking-lounge becomes a resumable session (casino wallets are incompatible with resident-lifecycle rooms) — an approved product change.

🤖 Generated with Claude Code

BCook98 and others added 4 commits July 3, 2026 19:02
Declares Kind=casino, MaxPayoutMultiplier=26, CtxFeatCredits; removes the
game's internal chip/KV wallet and wires bets through svc.Credits
Wager/Settle/Balance with one open stake per round, a single stake-inclusive
Settle, Settle-on-leave/abandon so escrow never leaks, and in-game rebuy via
svc.Credits.Buyback when busted. Peak-Credits leaderboard. Side bets/double/split accumulate onto one grossThisRound, settled once.
Verified: go build/vet/test, tinygo, and shellcade-kit check --require-leaderboard.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W7oJQSTva5xgbAZomdV5Jj
Declares Kind=casino, MaxPayoutMultiplier=36, CtxFeatCredits; removes the
game's internal chip/KV wallet and wires bets through svc.Credits
Wager/Settle/Balance with one open stake per round, a single stake-inclusive
Settle, Settle-on-leave/abandon so escrow never leaks, and in-game rebuy via
svc.Credits.Buyback when busted. Peak-Credits leaderboard. Whole board is one Wager at spin-lock; local-only chip placement pre-lock.
Verified: go build/vet/test, tinygo, and shellcade-kit check --require-leaderboard.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W7oJQSTva5xgbAZomdV5Jj
Declares Kind=casino, MaxPayoutMultiplier=10000, CtxFeatCredits; removes the
game's internal chip/KV wallet and wires bets through svc.Credits
Wager/Settle/Balance with one open stake per round, a single stake-inclusive
Settle, Settle-on-leave/abandon so escrow never leaks, and in-game rebuy via
svc.Credits.Buyback when busted. Peak-Credits leaderboard. Lifecycle Resident->Resumable (casino+resident is unsupported); gamble MaxWin and free-spin accumulation made stake-relative, gross capped at bet*10000.
Verified: go build/vet/test, tinygo, and shellcade-kit check --require-leaderboard.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W7oJQSTva5xgbAZomdV5Jj
Declares Kind=casino, MaxPayoutMultiplier=30000, CtxFeatCredits; removes the
game's internal chip/KV wallet and wires bets through svc.Credits
Wager/Settle/Balance with one open stake per round, a single stake-inclusive
Settle, Settle-on-leave/abandon so escrow never leaks, and in-game rebuy via
svc.Credits.Buyback when busted. Peak-Credits leaderboard. One outcome drawn at purchase; one Wager + one gross Settle per ticket.
Verified: go build/vet/test, tinygo, and shellcade-kit check --require-leaderboard.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W7oJQSTva5xgbAZomdV5Jj
@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown

Smoke screens

Deterministic scripted screens for 08362911e4cd0cf379ecfac9ebe83b3ee7c94ecb (what is this?)

games/alan/roulette — 12 screens

01-table.seat0
01-table.seat0

01-table.seat1
01-table.seat1

02-bets.seat0
02-bets.seat0

02-bets.seat1
02-bets.seat1

03-spinning.seat0
03-spinning.seat0

03-spinning.seat1
03-spinning.seat1

04-landed.seat0
04-landed.seat0

04-landed.seat1
04-landed.seat1

05-flashing.seat0
05-flashing.seat0

05-flashing.seat1
05-flashing.seat1

06-result.seat0
06-result.seat0

06-result.seat1
06-result.seat1

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

games/bcook/pokies — 5 screens

01-lounge-entrance
01-lounge-entrance

02-at-machine
02-at-machine

03-seated
03-seated

04-mid-spin
04-mid-spin

05-settled
05-settled

games/bcook/scratchies — 11 screens

01-counter
01-counter

02-stand.seat0
02-stand.seat0

02-stand.seat1
02-stand.seat1

03-fresh-card.seat0
03-fresh-card.seat0

03-fresh-card.seat1
03-fresh-card.seat1

04-mid-scratch.seat0
04-mid-scratch.seat0

04-mid-scratch.seat1
04-mid-scratch.seat1

05-result.seat0
05-result.seat0

05-result.seat1
05-result.seat1

06-result-2.seat0
06-result-2.seat0

06-result-2.seat1
06-result-2.seat1

@BCook98 BCook98 merged commit 2c14d29 into main Jul 3, 2026
3 checks passed
@BCook98 BCook98 deleted the add-credits-economy-games branch July 3, 2026 09:09
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