# Task ID: 20 # Title: User Level & Rank System (Frontend & Backend) # Status: pending # Dependencies: 5, 16, 17 # Priority: medium # Description: Expand the user profile to include a level system (1-100) based on accumulated experience points and a rank system (Bronze-King) based on game performance. # Details: Backend: Implement logic for XP thresholds for level progression. Define rules for rank promotion/demotion (e.g., every 10 levels for rank, or based on Elo/Glicko rating). Update `User` model and `Game End & Settlement` to reflect these changes. Frontend: Display user's current level and rank visually on their profile and in game UI. Design appropriate badges/icons for ranks. # Test Strategy: Play multiple games to gain XP and level up. Verify level and rank increase correctly. Test edge cases for rank promotion/demotion. Ensure UI accurately reflects the current level and rank.