How ibrahimsarran/mathgame-cpp works
A single-file console math quiz: the player configures a quiz, receives randomly generated arithmetic questions, answers them with immediate correctness and color feedback, then sees a pass/fail summary and can replay. The graph separates the user interaction, question generation, and answer/reporting stages, plus the internal arithmetic helper. All implementation is in Math Game.cpp; edges reflect calls visible in that excerpt. The README documents these same capabilities, so no unsampled subsystems are required.
Main entry points: Math Game.cpp Quiz Setup
Components 17
Quiz Interaction
- Replay Loop
Math Game.cpp - Quiz Setup
Math Game.cpp - Question Count Input
Math Game.cpp - Level Selection
Math Game.cpp - Operation Selection
Math Game.cpp
Question Generation
- Quiz State
Math Game.cpp - Question Generation
Math Game.cpp - Random Values
Math Game.cpp
Answering & Results
- Question Loop
Math Game.cpp - Question Display
Math Game.cpp - Answer Input
Math Game.cpp - Answer Check
Math Game.cpp - Color Feedback
Math Game.cpp - Final Report
Math Game.cpp
Arithmetic
- Arithmetic Calculator
Math Game.cpp
Other components
- Player
- Console
Connections 23
- Player → Replay Loop: starts and replays
README.md - Replay Loop → Quiz Setup: starts quiz
Math Game.cpp - Quiz Setup → Question Count Input: reads count
Math Game.cpp - Quiz Setup → Level Selection: reads level
Math Game.cpp - Quiz Setup → Operation Selection: reads operation
Math Game.cpp - Quiz Setup → Quiz State: sets preferences
Math Game.cpp - Quiz Setup → Question Generation: generates quiz
Math Game.cpp - Question Generation → Random Values: draws operands
Math Game.cpp - Question Generation → Arithmetic Calculator: calculates answer
Math Game.cpp - Question Generation → Quiz State: stores questions
Math Game.cpp - Quiz Setup → Question Loop: runs questions
Math Game.cpp - Question Loop → Question Display: prints question
Math Game.cpp - Question Loop → Answer Input: reads response
Math Game.cpp - Question Loop → Answer Check: checks response
Math Game.cpp - Answer Check → Quiz State: updates score
Math Game.cpp - Answer Check → Color Feedback: sets feedback
Math Game.cpp - Color Feedback → Console: changes color
Math Game.cpp - Question Display → Console: prints prompt
Math Game.cpp - Answer Input → Console: reads input
Math Game.cpp - Answer Check → Console: prints result
Math Game.cpp - Quiz Setup → Final Report: prints summary
Math Game.cpp - Final Report → Quiz State: reads totals
Math Game.cpp - Final Report → Console: prints report
Math Game.cpp