How josephamuasi001/number-guessing-game works
NumGenius is a PHP number-guessing game with account sessions, single-player and daily play, progression rewards, and multiplayer rooms. The main workflow is a player entering the web app, playing a round, and reaching results; the game class also defines difficulty, achievements, themes, and power-ups. JSON files provide apparent user, daily, and room state. The README gives no architectural detail, and the PHP excerpt is partial, so several subsystem connections are shown as unverified rather than asserted.
Main entry points: index.php Game rules · ng_users.json User data · ng_daily.json Daily data · ng_rooms.json Room data
Components 15
Web entry
- Request and UI
index.php - Session auth
index.php
Game modes
- Game rules
index.php - Single-player rounds
index.php - Daily challenge
index.php - Multiplayer rooms
index.php - Round results
index.php
Player progression
- XP and coins
index.php - Achievements
index.php - Themes
index.php - Power-ups
index.php
JSON state
- User data
ng_users.json - Daily data
ng_daily.json - Room data
ng_rooms.json
Other components
- Player
Connections 16
- Player → Request and UI: uses
- Request and UI → Session auth: checks session
index.php - Request and UI → Single-player rounds: routes actions
index.php - Request and UI → Daily challenge: routes actions
index.php - Request and UI → Multiplayer rooms: routes actions
index.php - Single-player rounds → Game rules: uses rules
index.php - Daily challenge → Game rules: uses rules
index.php - Multiplayer rooms → Game rules: uses rules
index.php - Single-player rounds → Round results: shows outcome
index.php - Round results → XP and coins: shows rewards
index.php - Game rules → Achievements: tracks progress
index.php - Request and UI → Themes: offers themes
index.php - Single-player rounds → Power-ups: uses power-ups
index.php - Game rules → User data: references file
- Game rules → Daily data: references file
- Game rules → Room data: references file