Skip to content

My implementation of the MathGame project.#723

Open
BudgetKratos wants to merge 2 commits into
the-csharp-academy:mainfrom
BudgetKratos:main
Open

My implementation of the MathGame project.#723
BudgetKratos wants to merge 2 commits into
the-csharp-academy:mainfrom
BudgetKratos:main

Conversation

@BudgetKratos

@BudgetKratos BudgetKratos commented Jul 12, 2026

Copy link
Copy Markdown

I took the advice below a bit too literally, this was my third attempt at the Math Game.

If this is your first project, I recommend doing it twice. You'll be surprised at how much your retention increases, and how many gaps were left in the first time.

I'm sure if I were left to my own devices, I would still be obsessing over the tiny details, trying to make everything perfect.

It's a habit I should kick or, at the very least, channel into something else!

@TheCSharpAcademy TheCSharpAcademy left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@BudgetKratos Thanks for submitting! There's a bug blocking in the history, which blocks the approval, could you please check?

⚠️ The score-history flow needs fixing.
When the player chooses not to play again, Operate() calls Menu() before reaching ScoreCard.Add(...). Consequently, the completed result is not added to the score history until the nested menu eventually returns. Repeated navigation also creates an unnecessary chain of recursive method calls.

Instead of calling Menu() from inside Operate(), let Operate() finish naturally:

if (!retry)
{
    ScoreCard.Add($"{CurrentDifficulty} {actualOperation} {score}");

    DisplayMessage("Press any key to go back to the previous menu.", displayColor);
    Console.ReadKey();
    return;
}

Upon fixing, just commit your changes, no need for a new PR 😁

@BudgetKratos

BudgetKratos commented Jul 14, 2026

Copy link
Copy Markdown
Author

Good catch, thank you ^_^

I've also slightly updated the code so that every retry counts as a separate attempt (as I had originally intended).

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