Repository navigation
feat(holdem): count stacks up and bump the pot when the winner is called - #93
Merged
Merged
Conversation
… the felt motion helpers - Tween the header stack from its held-back value to the final one on reveal, and add stackBeforeAward for the seat label and header - Replace the local reducedMotion and gapTo with the casino/motion exports - Skip the .tx-lift and TurnClock transitions under prefers-reduced-motion Claude-Session: https://claude.ai/code/session_01SiinSXHP71xKCXmAjpTHaM
- Animate the seat and header stacks from the held-back value to the paid-out value with the shared useCountUp hook, which already skips to the end under reduced motion - Derive the held-back stack from paidOut so an uncalled bet refund counts up too, and move stackBeforeAward next to it - Bump the pot figure as swept bets land, with the bump disabled under prefers-reduced-motion - Cover stackBeforeAward in the engine tests Claude-Session: https://claude.ai/code/session_01SiinSXHP71xKCXmAjpTHaM
|
Deployment failed for project game-time with the following error: Learn More: https://vercel.com/cloverings1s-projects?upgradeToPro=build-rate-limit |
|
Deployment failed for project game-time with the following error: Learn More: https://vercel.com/cloverings1s-projects?upgradeToPro=build-rate-limit |
Owner
Author
# Conflicts: # lib/texasholdem/index.ts # lib/texasholdem/winners.ts
# Conflicts: # components/texasholdem/TexasHoldem.tsx # components/texasholdem/texasholdem.css # lib/texasholdem/index.ts
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.
Summary
Stacks now count up when the winner is called, and the pot bumps when swept bets land.
Changes
useCountUphook, starting from the pre-award value.stackBeforeAwardinlib/texasholdem/winners.ts, built onpaidOut, so uncalled-bet refunds also count up.useCountUpreturn its target immediately when motion is reduced.Closes #45
Why
Chips used to jump to their new totals at showdown, which made it hard to see who won what. Counting up from the held-back stack ties the payout to the winner call.
Testing
pnpm typecheckandpnpm test(337 pass)tests/texasholdem.test.tsfor the uncalled-bet case (held stacks at showdown, unchanged on the river)Notes
The animation timing and pot bump were not checked in a browser.