Skip to content

Project Finished - #767

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

Project Finished#767
SamuelCabeza wants to merge 1 commit into
the-csharp-academy:mainfrom
SamuelCabeza:main

Conversation

@SamuelCabeza

Copy link
Copy Markdown

I did all by myself without viewing the youtube guide. (Except for the method in which i asked claude cause i didn't know how to do the timer thing).

@github-actions

github-actions Bot commented Sep 4, 2026

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

@SamuelCabeza Project approved! 😄✅ Very cool implementation of the math game with the difficulty levels dictated by time to answer the questions. I don't think I've seen that approach, very original 😊

🥋And congratulations! You got your Green belt!! 🟢🟢

👩‍🏫Feedback

🔍️There is an important menu bug:

Console.WriteLine("6. Exit");

but GetDifficultyLevel() only accepts values from 1 through 5:

if (int.TryParse(input, out difficulty) &&
    (difficulty >= 1 && difficulty <= 5))

🔍One thing worth noting is your comment:

//Timer, this method was done by IA

Using AI assistance isn't inherently a problem, but make sure you can explain how Stopwatch, Console.KeyAvailable, Console.ReadKey(intercept: true), and the timeout loop work. That's where the learning value of using assisted code comes from.

🔍You repeatedly create Random instances. It's better to have one shared instance:

var random = new Random();

and reuse it throughout the application. Random.Shared is another simple modern option.

🔍Your timer calculation also works, but nested ternaries become difficult to read:

int timer = difficulty == 1 ? 60 :
            difficulty == 2 ? 30 :
            difficulty == 3 ? 10 : 5;

A switch expression would communicate the mapping more clearly:

int timer = difficulty switch
{
    1 => 60,
    2 => 30,
    3 => 10,
    4 => 5,
    _ => throw new ArgumentOutOfRangeException(nameof(difficulty))
};

🕵️‍♀️Also, have a look at our style guide since there are a few issues in your code. e.g. lots of unnecessary comments, as per picture below. You can read our code conventions here🤓.

image

🧐Challenges Review

You’ve actually extended the standard Math Game quite nicely.

✅The difficulty levels are a good addition, particularly because they have meaningful consequences rather than simply changing a label:

✅ The timer implementation is also a substantial extra feature. It handles character input, backspace, Enter, and timeout without leaving an unfinished asynchronous read hanging around.

✅ Your Expert/random game mode is another good extension. Randomizing the operation independently for every question makes that mode meaningfully different from the standard games.

🗺️ Suggested next step

I 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 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