Hey everyone,
I was doing the lecture ‘Section 2 Integration Challenge’ and for the challenge of adding in the menu prompt, i came up with something slightly different to the lecturer. My method works, but is there some pitfall that i am not seeing, or is it a valid, just different path.
I defined a method called ReturnToMenu() (Code Below) and called it where necessary (Example Below)
defining ReturnToMenu()
void ReturnToMenu()
{
Terminal.WriteLine("Type 'menu' to return to the Main Menu");
Terminal.WriteLine(" ");
}
Example of calling ReturnToMenu() Method
void AskForPassword()
{
currentScreen = Screen.Password;
Terminal.ClearScreen();
SetRandomPassword();
ReturnToMenu();
Terminal.WriteLine("Enter your password, hint: " + password.Anagram());
}
Regards,
Dearte