Skip to content

Add game details screen and ladder payout system#117

Open
Larkooo wants to merge 3 commits intomainfrom
Larkooo/game-details-payout
Open

Add game details screen and ladder payout system#117
Larkooo wants to merge 3 commits intomainfrom
Larkooo/game-details-payout

Conversation

@Larkooo
Copy link
Contributor

@Larkooo Larkooo commented Feb 12, 2026

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:

  • 0-99 moonrocks: 0 tokens (total loss)
  • 100-199 moonrocks: 5 tokens
  • 200-299 moonrocks: 25 tokens
  • 300-399 moonrocks: 100 tokens (break-even)
  • 400-499 moonrocks: 400 tokens
  • 500+ moonrocks: 1600 tokens (max, capped)

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

  • New components: PayoutChart, GameDetails
  • Payout tier constants and utility functions
  • Tiered payout in smart contract (game.cairo) and offline mode (engine.ts)
  • Updated integration tests to reflect tiered rewards

- 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>
@vercel
Copy link

vercel bot commented Feb 12, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
glitchbomb Ready Ready Preview Feb 12, 2026 8:34pm
glitchbomb-storybook Ready Ready Preview Feb 12, 2026 8:34pm

Request Review

- Organize imports alphabetically
- Simplify single-line conditionals
- Reorder DetailRow props to match Biome formatter preferences
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