//Ceiling Option public static void Ceiling() { Clear(); WriteLine("\n You can see the silhouette of a lamp but it doesn't seems to work. Maybe there's something missing. \n "); WriteLine(" 1) Go back"); WriteLine(" 2) Open backpack \n"); //Looping thru the menu until a valid option in entered and then loading a new function bool input = true; do { string menuChoice = ReadLine(); switch (menuChoice) { case "1": bathroom.BathroomStart(); break; case "2": //If backbackresponse is matching string: Delete object and move on to BathroomView() string backpackResponse = foundObjects.OpenBackpack(); if (backpackResponse == "back") { Ceiling(); } else if (backpackResponse == "BathroomLamp") { Clear(); WriteLine("\n Yes, finally som light! Now you can se what's in the room."); ReadLine(); foundObjects.DeleteObject("Light-bulb"); BathroomView(); } else { WriteLine("\n Naahh...that didn't work"); ReadLine(); Ceiling(); } break; default: WriteLine("\n What are you trying to do? That's not a correct input Try again.."); input = false; break; } } while (input == false); }
//Overview of the Basement public void BasementView() { Clear(); WriteLine("\n It seems like the room you're in is a basement with two doors, a metallic one and a older one in wood."); WriteLine(" The only furniture is an old rusty bed and a desk."); WriteLine(" What do you wanna do?\n"); WriteLine(" 1) Go to the metalic door"); WriteLine(" 2) Go to the desk"); WriteLine(" 3) Look closer at the floor"); //Check if bathroomdoor is open or not to show matching menu if (!foundObjects.CheckForUsedObject("Key")) { WriteLine(" 4) Go to the second door"); } else { WriteLine(" 4) Go to Bathroom"); //Go straight to bathroom instead } WriteLine(" 5) Check out the bed"); WriteLine(" 6) Open BackPack\n"); //Looping thru the menu until a valid option in entered and then loading a new function bool input = true; do { string menuChoice = ReadLine(); switch (menuChoice) { case "1": BasementDoor(); break; case "2": Desk(); break; case "3": Floor(); break; case "4": //Depending on what menu is shown if (!foundObjects.CheckForUsedObject("Key")) { BathroomDoor(); } else { bathroom.BathroomStart(); } break; case "5": Bed(); break; case "6": //Opening Backpack and handeling response string backpackResponse = foundObjects.OpenBackpack(); if (backpackResponse == "back") { BasementView(); } else { WriteLine("\n Naahh...that didn't work"); ReadLine(); BasementView(); } break; default: WriteLine("\n What are you trying to do? That's not a correct input Try again.."); input = false; break; } } while (input == false); }