//Bathroom Option
        public void BathroomStart()
        {
            Clear();
            //If light-bulb is not used continue this function, else go stright to BathroomView()
            if (!foundObjects.CheckForUsedObject("Light-bulb"))
            {
                WriteLine("\n The room is very dark but the light coming from the other room helps you a little bit. ");
                WriteLine(" It's most likely a bathroom and you can feel there's a lot of water on the floor. ");
                WriteLine(" It sounds like there's water flushing somewhere..but it's to dark to se \n ");

                WriteLine(" 1) Go inside.");
                WriteLine(" 2) Check the ceiling.");
                WriteLine(" 3) Look at the floor.");
                WriteLine(" 4) Go back to Basement \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":
                        Clear();
                        WriteLine("\n Nahh...it's to dark and to much water...");
                        ReadLine();
                        BathroomStart();
                        break;

                    case "2":
                        Ceiling();
                        break;

                    case "3":
                        Clear();
                        WriteLine("\n Hmm..something is laying on the floor..what is it? It's to dark..");
                        ReadLine();
                        BathroomStart();
                        break;

                    case "4":
                        basement.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);
            }
            else
            {
                BathroomView();
            }
        }
示例#2
0
        //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);
        }