I'm making a simple guessing game in C# where the computer generate a number between 1-10, and I got both a clickEvent and a KeyPressedEvent (to the Enter key) to "submit" the guess.
I'm trying to make it so you can just type "reset" into the text field and hit enter to call on the StartNewGame() method but it doesn't seem to activate the method.
I tried both
if (userReset.Equals("reset"))
{
StartNewGame();
}
and
if (userReset == "reset" )
{
StartNewGame();
}
but it does not seem to call on that StartNewGame()
I'm using Visual Studio 2019 on Windows 10.