Add game details screen and ladder payout system#117
Open
Conversation
- Add payout tiers: 100→5, 200→25, 300→100 (break-even), 400→400, 500→1600 (max) - Create PayoutChart component with step function visualization, grid, and break-even line - Create GameDetails screen showing entry price, tiers, and payout information - Integrate GameDetails into games page to show before purchase confirmation - Implement tiered payout function in smart contract (game.cairo) - Update cash_out() to return tiered rewards instead of raw points - Mirror tiered payout logic in offline mode for consistency - Add comprehensive tests for all tier boundaries Break-even at 300 moonrocks, maximum reward capped at 1600 tokens (16x entry price). Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
- Organize imports alphabetically - Simplify single-line conditionals - Reorder DetailRow props to match Biome formatter preferences
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
This PR adds a game details screen and implements a tiered payout system to create meaningful risk/reward gameplay dynamics.
Game Details Screen: Shows entry price (100 tokens), payout tiers, break-even threshold (300 moonrocks), and maximum reward (1600 tokens / 16x multiplier). Players see this before confirming purchase.
Ladder Payout Tiers:
Implementation: PayoutChart SVG component with step function visualization, grid, break-even line, and Y-axis labels. Smart contract payout function mirrors offline engine for consistency. All 89 Cairo tests passing.
Changes