An advanced, interactive console-based mathematics game built in C# that helps users practice basic arithmetic operations with adjustable difficulty levels, time constraints, and comprehensive statistics tracking.
- Multiple operation modes:
- Addition
- Subtraction
- Multiplication
- Division
- Random mode (mix of all operations)
- Three difficulty levels with customizable settings:
- Easy (45 seconds per question)
- Medium (30 seconds per question)
- Hard (15 seconds per question)
- Each level affects:
- Time limits
- Number ranges
- Scoring multipliers
- Base points for correct answers
- Dynamic bonus points based on:
- Response time
- Difficulty level
- Speed multipliers
- Comprehensive statistics tracking
- Color-coded feedback system
- Real-time progress monitoring
- Game history with detailed records
- Configurable game settings via appsettings.json
- .NET 8.0 SDK or later
- Compatible operating systems:
- Windows
- macOS
- Linux
- Clone the repository:
git clone https://github.com/bababubudev/MathGame.git
cd MathGame- Install dependencies:
dotnet restore- Build the project:
dotnet build- Run the application:
dotnet runMathGame/
├── Program.cs # Application entry point
├── appsettings.json # Configuration settings
├── MathGame.csproj # Project file
├── Models/ # Data models
├── Services/ # Core game services
└── Operations/ # Math operations
The game can be customized through appsettings.json:
{
"GameSettings": {
"BasePoints": 5,
"MaxBonus": 10,
"MaxRange": 30,
"Difficulties": {
"Easy": {
"TimeLimit": 45,
"RangeMultiplier": 1,
"ScoreMultiplier": 0.2
}
// ... other difficulty settings
}
}
}-
Start the game and choose from the available options:
- [1] Addition
- [2] Subtraction
- [3] Multiplication
- [4] Division
- [5] Random mode
- [6] Show game history
- [7] Change difficulty
- [8] Exit
-
For each question:
- A math problem will be displayed
- Enter your answer before the timer runs out
- Receive immediate color-coded feedback
- Earn points based on speed and accuracy
-
Random Mode:
- Choose the number of questions you want to attempt
- Questions are randomly selected from all operation types
- Track your progress with the built-in statistics
The game provides detailed statistics including:
- Overall accuracy rate
- Average response time
- Performance by operation type
- Score distribution
- Historical game records
The game uses color-coding for better user experience:
- Green: Correct answers
- Red: Incorrect answers
- Yellow: Warnings and important notices
- Cyan: Highlights and headers
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
