• Mahmoud Aglan's avatar
    feat: daily challenges + streak + rank tiers system · 5ade83d4
    Mahmoud Aglan authored
    Daily Challenges (api/challenges.php):
    - GET: returns 3 randomized challenges per day (deterministic per user+date)
    - 10 challenge types: play X games, win X, play specific game, solve puzzles,
      beat bot, claim daily, win streak
    - Rewards scale with player level (+10% coins per level)
    - POST claim: grants coins + XP, records transaction
    - Streak tracking with bonus multiplier
    
    Challenges UI (rewards/scenes/challenges.js):
    - Progress bars per challenge
    - Claim button with coin burst + fly-to-HUD animation
    - Streak badge showing consecutive days
    - Staggered card entrance animation
    - Haptic success on claim
    
    Rank Tiers (rewards/scenes/ranks.js):
    - 7 tiers: Bronze → Silver → Gold → Platinum → Diamond → Master → Grandmaster
    - Rating ranges defined for each tier
    - getTier(), getTierProgress(), getNextTier() utilities
    - Arabic + English names, colors, icons
    Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
    5ade83d4
challenges.php 5.12 KB