Hey folks,
I have added some conditional flow using if and else, so now our baby game responds to input by an input of its own.
Check out some of the responses:
And here is the code I used:
void OnUserInput(string number) {
if (number == "Menu")
{
Terminal.ClearScreen();
ShowMainMenu("Hello Silviya");
}
else if (number == "1")
{
Terminal.WriteLine("Lets hack into your neighbors PC");
}
else if (number == "2")
{
Terminal.WriteLine("Lets show these bastards what a hacker does!");
}
else if (number == "3")
{
Terminal.WriteLine("Lets fry some servers!");
}
else if (number == "See you later")
{
Terminal.WriteLine("aligator");
}
else if (number == "Jesus")
{
Terminal.WriteLine("take the wheel");
}
else if (number == "Knock Knock")
{
Terminal.WriteLine("Whos there?");
}
else if (number == "hit me baby")
{
Terminal.WriteLine("one more time");
}
else if (number == "911")
{
Terminal.WriteLine("Whats your emergency?");
}
else if (number == "69")
{
Terminal.WriteLine("If you know what I mean...");
}
else if (number == "666")
{
Terminal.WriteLine("+");
}
else if (number == "Hello")
{
Terminal.WriteLine("Hi there");
}
else if (number == "Whats your name")
{
Terminal.WriteLine("A girl has no name");
}
else if (number == "Exit")
{
Terminal.WriteLine("Bye!");
}
else {
Terminal.WriteLine("I dont understand");
}
}
Hope you like it.
Let me know which responses on input would you add.