static void Main(string[] args) { while (RunStat.IsRunning && Inventory.Php > 0) { //game start Console.WriteLine("welcome to the game! I hope you enjoy in some way!"); Console.WriteLine("Simple Instructions:"); Console.WriteLine("Type 'quit' at any time to quit."); Console.WriteLine("Type 'inventory' at any time to see what items you possess."); Console.WriteLine("Type 'look around' at any time to see what is around you."); Console.WriteLine("Type 'has been' to at any time to see where you have been so far."); Console.WriteLine("Type 'back' to return to the previous room (if you can)"); Console.WriteLine("Type 'clear' to clear the console."); Console.WriteLine("Type 'potatoes' to begin"); String KeyIn = Input.getInput(); if (KeyIn.Equals("potatoes")) { Console.WriteLine("Prepare yourself, this is the best game ever...."); AboveGround.Kitchen(); } if (KeyIn.Equals("iwannaskip")) { Skip.s(); } else { Console.WriteLine("I'll give you the benefit of the doubt, welcome to the best game ever...."); AboveGround.Kitchen(); } } }
public static void Kitchen() { if (HasVisit.kitchen) { Console.WriteLine(Label.KL); } else { Console.WriteLine(Desc.k1); } HasVisit.kitchen = true; String KeyIn = Input.getInput(); String Parsed = Input.Parser(KeyIn); if (KeyIn.Equals("take flask")) { if (Inventory.FlaskKitchen) { Console.WriteLine("There isn't a flask here to take!"); } else { Console.WriteLine("you take the flask"); Inventory.flask = true; AboveGround.Kitchen(); } } else if (Parsed.Equals("east")) { AboveGround.Bedroom(); } else if (Parsed.Equals("look")) { Console.WriteLine(Desc.k1); Kitchen(); } else if (Parsed.Equals("quit")) { RunStat.IsRunning = false; } else if (Parsed.Equals("has been")) { HasVisit.Print(); Kitchen(); } else if (Parsed.Equals("inv")) { Inventory.ItemStatusPrint(); Kitchen(); } else if (Parsed.Equals("clr")) { Console.Clear(); GC.Collect(); Kitchen(); } else { Console.WriteLine("You look around confused."); Kitchen(); } }
public static void Bedroom() { if (HasVisit.bedroom) { Console.WriteLine(Label.BL); } else { Console.WriteLine(Desc.b1); } HasVisit.bedroom = true; String KeyIn = Input.getInput(); String Parsed = Input.Parser(KeyIn); if (KeyIn.Equals("take bottle")) { if (Inventory.FlareGunN1Taken) { Console.WriteLine("There isn't a flare gun here to take!"); } else { Console.WriteLine("You take the bottle"); Inventory.bottle = true; AboveGround.Bedroom(); } } else if (KeyIn.Equals("take bag") || KeyIn.Equals("take sack") || KeyIn.Equals("take wool sack")) { if (Inventory.FlareGunN1Taken) { Console.WriteLine("There isn't a flare gun here to take!"); } else { Console.WriteLine("You take the wool sack"); Inventory.sack = true; AboveGround.Bedroom(); } } else if (KeyIn.Equals("go left")) { Closet(); } else if (Parsed.Equals("look")) { if (Inventory.bottle) { Console.WriteLine(Desc.b2); } else if (Inventory.sack) { Console.WriteLine(Desc.b3); } else if (Inventory.sack && Inventory.bottle) { Console.WriteLine(Desc.b4); } else { Console.WriteLine(Desc.b1); } } else if (Parsed.Equals("quit")) { RunStat.IsRunning = false; } else if (Parsed.Equals("has been")) { HasVisit.Print(); Bedroom(); } else if (Parsed.Equals("inv")) { Inventory.ItemStatusPrint(); Bedroom(); } else if (Parsed.Equals("back") || Parsed.Equals("west")) { AboveGround.Kitchen(); Bedroom(); } else if (KeyIn.Equals("clear")) { Console.Clear(); GC.Collect(); Bedroom(); } else { Console.WriteLine("You look around confused."); Bedroom(); } }