Repository navigation
Add Ask the Dealer to Training and Standard modes - #3
Merged
Merged
Conversation
Training: reveals the Basic Strategy play, ends the live streak, leaves the hand out of the stats, and recharges over the next three hands. Standard: the dealer suggests a move per decision, right 50% of the time at first. Following good advice asks for a $5 tip after the round settles; a tip raises the dealer's accuracy by 5 points and a refusal lowers it, within 0-100. The accuracy is not saved. Closes #2 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Closed
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The Button compile error blocks the build, and Training does not keep Split available for feedback on non-pair hands.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (1)
What changed in this PR
Adds Ask the Dealer functionality to Training and Standard blackjack modes, including recharge behavior, probabilistic advice, tipping, and accuracy tracking.
Changes:
- Added Training advice reveal, streak handling, and recharge UI.
- Added Standard advice, tip prompts, and accuracy adjustments.
- Updated controls, logic types/constants, tests, and documentation.
| File | Reviewed change / final note |
|---|---|
tests/TrainingSession.test.ts |
Adds Training advice and recharge coverage. |
tests/StandardGame.test.ts |
Adds Standard advice and tipping coverage. Nit (1 vote): add split-hand advice coverage. |
src/game/ui/Button.ts |
Adds dynamic sublabels. Critical (2 votes): readonly sub assignment causes TS2540 and blocks the build. |
src/game/scenes/Training.ts |
Adds the Training Ask Dealer control. |
src/game/scenes/Standard.ts |
Adds Standard advice and tip controls. |
src/game/logic/types.ts |
Adds advice, recharge, and tip state types. |
src/game/logic/TrainingSession.ts |
Implements Training advice logic. Moderate (1 vote): Split remains unavailable on non-pair hands after asking. |
src/game/logic/StandardGame.ts |
Implements Standard advice, tipping, and accuracy behavior. |
src/game/logic/constants.ts |
Defines feature constants. |
CLAUDE.md |
Documents the feature behavior. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Closes #2
Training
A) shows the Basic Strategy play for the current hand.recharging (n).Standard
dealerAccuracy% of the time, starting at 50; otherwise it's a random other legal move.tipphase comes after the round settles: Tip $5 or No thanks (Y/N). The auto-sweep waits until you choose.Other changes
logic/still has no Phaser imports.StandardGametakes arandomoption andTrainingSessiontakes an optionalshoe, so tests can control the dealer's luck and stack the cards.Buttonhas a newsetSublabel().Testing
npm test: 142 passing, including a newtests/TrainingSession.test.tsand an Ask the Dealer block intests/StandardGame.test.ts.npx tsc --noEmitis clean.🤖 Generated with Claude Code