Skip to content

Fix bust % double-counting in play mode cheater view - #27

Merged
lchoward merged 1 commit into
mainfrom
feature/fli-16-bust-calc-fix
Feb 19, 2026
Merged

lchoward merged 1 commit into
mainfrom
feature/fli-16-bust-calc-fix

Conversation

@lchoward

Copy link
Copy Markdown
Owner

Summary

  • getEffectiveDealtCards() already includes current round hands + cancelled cards, but calculateBustChance was also subtracting them via allPlayerData, causing current cards to be removed twice from the remaining count
  • This made the denominator too low and the bust percentage too high
  • Passes {} as allPlayerData since dealt already accounts for all in-play cards — fixes both the cheater banner display and CPU strategy decisions

Test plan

  • Start a play mode game with cheater mode on
  • Verify the bust banner denominator matches the "X cards in deck" count shown at the top
  • Verify CPU players still make reasonable hit/stand decisions

Closes FLI-16

🤖 Generated with Claude Code

getEffectiveDealtCards() already includes current round hands, so passing
allPlayerData to getRemainingCards caused current cards to be subtracted
twice, making the denominator too low and bust % too high.

Closes FLI-16

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@linear

linear Bot commented Feb 19, 2026

Copy link
Copy Markdown

@lchoward
lchoward merged commit 9db4113 into main Feb 19, 2026
1 check passed
@lchoward
lchoward deleted the feature/fli-16-bust-calc-fix branch February 19, 2026 09:26
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