Hello,
I am really enjoying this class so far!
Per the game design, I feel that there is a bug in the CheckPassword code.
void CheckPassword(string input)
{
if (input == password)
{
DisplayWinScreen();
}
else
{
AskForPassword(); <-------------
}
}
When you AskForPassword it will reset the password and then run the anagram. If I am understanding the design correctly, the idea is to only rerun the anagram so as to give a further hint to the correct password. Not reset password again.
void AskForPassword()
{
currentScreen = Screen.Password;
Terminal.ClearScreen();
SetRandomPassword(); <----------------
Terminal.WriteLine("Enter your password, hint: " + password.Anagram());
Terminal.WriteLine(menuHint);
}
A possible solution to this could be to only set the random password in the RunMainMenu method.
.......
{
level = int.Parse(input);
SetRandomPassword(); <-------------------------
AskForPassword();
}
........
Thank you again for creating all this content. I am looking forward to the next section!
Michael