Okay. I made two separate voids to check input in each of them, so if input == password which I think about
terminal prints “Database hacked” and if input is different terminal prints “Password inccorect, try again”:
void passwordOneCheck(string input)
{
if (input == "книга")
{
Terminal.WriteLine("База данных взломана.");
}
else if (input != "книга")
{
Terminal.WriteLine("Не верный пароль, попробуйте снова.");
}
}
void passwordTwoCheck(string input)
{
if (input == "пулемет")
{
Terminal.WriteLine("База данных взломана.");
}
else if (input != "пулемет")
{
Terminal.WriteLine("Не верный пароль, попробуйте снова.");
}
So if we are on level 1 we run passwordOneCheck if we are on level 2 we run passwordTwoCheck
if (input == "меню")
{
WelcomeMenu();
}
else if (currentScreen == Screen.MainMenu)
{
RunMainMenu(input);
}
else if (level == 1)
{
passwordOneCheck(input);
}
else if (level == 2)
{
passwordTwoCheck(input);
}
I’m Russian and im not best in English but I hope you understand the idea took me 2 hours of strugle to do that.