Skip to content

Submit Math Game for review - #751

Closed
CyberNexus-code wants to merge 1 commit into
the-csharp-academy:mainfrom
CyberNexus-code:main
Closed

Submit Math Game for review#751
CyberNexus-code wants to merge 1 commit into
the-csharp-academy:mainfrom
CyberNexus-code:main

Conversation

@CyberNexus-code

@CyberNexus-code CyberNexus-code commented Aug 22, 2026

Copy link
Copy Markdown

Hi, Please review when possible.

@github-actions

Copy link
Copy Markdown

🚀 Project Submitted!

Thanks for submitting your project! I will review it soon.

📋 Please check the dashboard to make sure the project is marked as Pending.

⚠️ If it's not marked as pending, submit it manually using the URL for this PR.

@TheCSharpAcademy

Copy link
Copy Markdown
Collaborator

@CyberNexus-code Project approved! 😄✅ Very solid Math Game ticking all boxes along with the challenges and even unit tests! Superb work 😊

🥋And you got your Green belt!! 💚💚

👩‍🏫Feedback

🔍️The standout here is the architecture. Rather than duplicating four nearly identical game methods, you've abstracted operation selection behind IOperationProvider, isolated question generation in MathQuestion, moved difficulty configuration into GameSettings, and isolated timing behind IGameTimer. That's good application of separation of concerns and DRY principles.

🔍️Game receives a GameMode and stores it in _mode, but that field isn't subsequently used. Since the operation provider already determines whether the game is fixed or random, you could remove this dependency unless you plan to use the mode later.

🔍️AskQuestion(Random rand) and GetQuestion(Random rand) don't really need a Random parameter because Game already owns _rand. They could simply use the field internally.

🔍GameResult would also be more idiomatic C# with properties instead of public fields:

public int Score { get; }
public string Operation { get; }
public DifficultyLevel DifficultyLevel { get; }
public TimeSpan Duration { get; }

🧐Challenges Review

✅ Difficulty levels
✅ Timer
✅ Random game
✅ Unit tests: Great to see these included. You're testing calculation behavior, division-number generation, and operation symbols rather than console output. That's exactly the kind of logic that benefits from unit tests.

🗺️ Suggested next step

I noticed that you already complete our OOP course. I'd highly recommend taking our LINQ Fundamentals course next. LINQ is one of the most important tools in modern C# and becoming comfortable with it will make your code much cleaner and more expressive.


☕If you like our roadmap, please consider buying us a coffee. We appreciate your help 🙂

Overall great work!✋🏻Looking forward to seeing your next projects!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants