Math Game Project
An interactive C++ console math quiz that generates randomized questions and lets the player practice arithmetic operations across multiple difficulty levels.
Project Status
Core gameplay is implemented and functional. The project is a compact C++ exercise focused on functions, enums, structures, random number generation, validation, and game-state management.
Feature Status
Implemented — Working
- Difficulty selection — Easy, Mid, Hard, and Mixed.
- Operation selection — Addition, Subtraction, Multiplication, Division, and Mixed.
- Custom question count from 1 to 10.
- Random question generation.
- Immediate answer checking.
- Correct-answer display after a wrong answer.
- Score tracking.
- Pass/Fail result based on correct vs. incorrect answers.
- Replay option after each game.
- Console color feedback for correct and incorrect answers.
- Input validation for numeric menu selections.
Partially Implemented / Needs Refinement
- Division — The current calculator uses integer arithmetic, so division does not support decimal results.
- Console UI — The color-based interface is designed around Windows console commands.
- Question generation — The current range is intentionally simple and can be expanded for more variety.
Planned — Coming Soon
The following improvements are not currently implemented and are planned for future updates:
- Decimal/floating-point division.
- More question types.
- Larger difficulty ranges.
- Timer-based challenges.
- High-score tracking.
- More detailed game statistics.
- Cross-platform console support.
- Improved UI presentation.
Game Flow
Start Game
│
▼
Choose Number of Questions
│
▼
Choose Difficulty
│
▼
Choose Operation
│
▼
Generate Random Questions
│
▼
Answer Questions
│
▼
Check Answers
│
▼
Display Final Results
│
▼
Play Again?
Technologies & Concepts
- C++
- Functions
- Structures
- Enumerations
- Random number generation
- Loops and conditionals
- Input validation
- Console interaction
Getting Started
- Open the project source in a C++ development environment such as Visual Studio, Code::Blocks, or MinGW.
- Compile the source as a C++ console application.
- Run the executable.
- Follow the prompts to configure and play a quiz.
Note: The current implementation uses Windows console commands such as
system("cls")andsystem("color"), so Windows is the intended environment.
Learning Objectives
This project demonstrates practical understanding of:
- Breaking a program into reusable functions.
- Managing state with structures and enums.
- Generating randomized data.
- Validating user input.
- Designing a simple interactive console application.
Roadmap
Future updates will expand the question system, improve mathematical handling, add statistics, and make the game more flexible.
Author
Aseelcoding
Log in or sign up for Devpost to join the conversation.