MathGame console application - #753
Conversation
…s. Add, Subtract ops.
…menu to prompt multiple game options.
…ops, Add missing operations (mult, division).
…ntrol game sequence. Bring back Menu Prompt to choose an operation.
🚀 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. |
|
@ivangar Project approved! 😄✅ The code is neatly organized and with very good separation of concerns. 👏👏It's a shame you didn't complete the challenges this time. 😟 It's always a good use of your time. But nothing stops you from revisiting the project later. 🥋Don't forget you need to submit the Freecodecamp certificate to earn your Green Belt.👏 👩🏫Feedback🔍️The biggest one is IsPrimeNumber(). You don't actually need prime-number detection for GetDivisor(). This already works for prime numbers: For a prime number, that simply produces 1 and the number itself. Removing IsPrimeNumber() would therefore simplify the code without losing functionality. 🔍️Also, GameValidator.ValidateAnswer(..., ref int score) makes the validator responsible for modifying game state. A cleaner design would be for validation to return whether the answer is correct and let Game update _score 🔍IGame doesn't provide much value at the moment because there's only one implementation and GameCenter directly creates new Game(). There's nothing wrong with practicing interfaces, but avoid introducing abstractions purely for their own sake. If another game implementation or dependency injection appears later, the interface becomes much more useful. 🗺️ Suggested next stepI noticed that you haven't completed any of our courses yet. I suggest you try our Intro to Object Oriented Programming course next. This will close gaps in your knowledge and give you more confidence about OOP. ☕If you like our roadmap, please consider buying us a coffee. We appreciate your help 🙂 Overall good work!✋🏻Looking forward to seeing your next projects! |
This PR adds the initial MathGame console application and project solution to the repository.
What’s included
• Solution and project files for MathGame.ivangar targeting .NET 10
• Core gameplay implementation (GameCenter.cs) and program entry point
• Game and Menu options with validations
How to test