コード例 #1
0
        public static void entrywayChoice()
        {
            WriteLine("|                                               |");
            WriteLine("|                       ------------------------|");
            WriteLine("|                    |  |                       |");
            WriteLine("|                    |  |                       |");
            WriteLine("|--------------------|  |                       |");
            WriteLine("|                  --|  |---                    |");
            WriteLine("|                  |      |                     |");
            WriteLine("|                 \\ Entry \\                     |");
            WriteLine("|------------------|--\\---|-----------------------|");


            WriteLine("You have a few choices to make. What would you like to do?");
            WriteLine("Enter '1' to check the Left Door\nEnter '2' to check the Right Door\nEnter '3' to choose the Hall\n'4' to Leave the House\nEnter '0' to end the program");
            var choiceEntry = Int32.Parse(ReadLine());

            switch (choiceEntry)
            {
            case 0:
                WriteLine("You have exited the program.");
                System.Environment.Exit(0);
                break;

            case 4:
                WriteLine("You decide to put off this investigation for another day.");
                WriteLine("Press 'Enter' to continue.");
                Console.ReadLine();
                break;

            case 1:
                study();
                break;

            case 2:
                livingRoom();
                break;

            case 3:
                FrontHouse.hallway();
                break;

            default:
                ItemSearches.nothing();         //will cut back on repetitive code
                break;
            }
        }
コード例 #2
0
ファイル: index.cs プロジェクト: CyborgAnt/Haunted_House_2
        public static void Main(string[] args)
        {
            Console.Clear();
            Console.WriteLine("Welcome to 'Mystery At The Manor', a Choose-Your-Own-Adventure Story!");
            Console.WriteLine("The owners of the Manor, Richard and Rosalyn Adams, have been missing for days. They are the latest in a string of disappearances and strange reports that involve the Manor.\nYou are a Private Investigator, hired to find out where the Adams couple is... and what is going on at their manor.");

            Console.WriteLine("Press 'Enter' to Continue.");
            Console.ReadLine();
            Console.WriteLine("You are equipped with a phone, backpack, and a gun.\nWill you find the Adams couple?\nWill you you solve the mysteries of the Adams Manor?\n\nIt all depends on the choices you make!");
            Console.WriteLine("Press 'Enter' to Continue.");
            Console.ReadLine();         // waits on the user to press Enter

            Console.Clear();            // clears the console screen
            WriteLine("The adventure begins with you parking your car on the street and walking up to the porch of the house.\nThere is a large front yard; there is a grove of trees to the right.\nYou grab the handle of the front door, pull it open, and step inside....");

            WriteLine("Press 'Enter' to continue.");
            Console.ReadLine();
            Console.Clear();
            FrontHouse.entryway();
        }
コード例 #3
0
        public static void tHallChoose()
        {
            WriteLine("|-------------------------------------------------------------------|");
            WriteLine("|                    |                        |                     |");
            WriteLine("|                    |                        |                     |");
            WriteLine("|                    |                        |                     |");
            WriteLine("|                    |                        |                     |");
            WriteLine("|                    |                        |                     |");
            WriteLine("|----------\\----------------------\\-------------------||------------\\");
            WriteLine("|---------\\---------------\\-----       -----------------------------|");
            WriteLine("|                     |         |      |                            |");
            WriteLine("|      Bedroom        |  Bath   |      |        Living Room         |");
            WriteLine("|                     |         |      |                            |");

            WriteLine("What do you do?");
            WriteLine("1. Take the Left Hall and check the Right Door\n2. Take the Left Hall and check the Left Door\n3. Take the Left Hall and check the Bathroom\n4. Check the Door Ahead\n5. Take the Right Hall and check the Left Door\n6. Check the door to the Outside\n7. Go back to the Entry");

            var tHallChoice = Int32.Parse(Console.ReadLine());

            switch (tHallChoice)
            {
            case 1:
                // Left - Right Door
                // Master Bedroom
                WriteLine("You turn down the left branch of the new hallway.\nYou decide to see what's behind the door on the right. Press 'Enter' to continue.");
                Console.ReadLine();
                masterBedroom();
                break;

            case 2:
                // Left - Left Door
                // Bedroom
                FirstFloor.FrontHouse.bedroom();
                break;

            case 3:
                // Left - Bathroom
                WriteLine("You decide to take the left hallway. You check the Bathroom.\nPress 'Enter' to continue.");
                Console.ReadLine();
                Console.Clear();
                FirstFloor.FrontHouse.bathroom();
                break;

            case 4:
                // Dining Room
                diningRoom();
                break;

            case 5:
                // Right - Left Door
                kitchen();
                break;

            case 6:
                // Outside
                break;

            case 7:
                // Back to the Entry
                FrontHouse.entrywayChoice();
                break;

            default:
                break;
            }
        }