My input system for lecture number 19 Terminal Hacker

void OnUserInput(string input)
{
if(input == “menu”)
{
Terminal.ClearScreen();
var HackIn = “What would you like to hack into?”;
Terminal.WriteLine(“Hello User”);
var FirstChoice = “Press 1 for the local library”;
Terminal.WriteLine(FirstChoice);
var SecondChoice = “Press 2 for the police station”;
Terminal.WriteLine(SecondChoice);
var StartHack = “Enter selection:”;
Terminal.WriteLine(StartHack);
}
else
if (input == “007”)
{
Terminal.WriteLine(“Welcome Mr.Bond”);
print(“James Bond EasterEGG”);
}
else
if(input == “1” )
{
Terminal.WriteLine(“Hacking Local Library”);
}
else
if (input == “2”)
{
Terminal.WriteLine(“Hacking Police Station…”);

    }

}

}

1 Like

Good job with your code! Looking good

Privacy & Terms