Ejemplo n.º 1
0
        public static void Main(string[] args)
        {
            WriteLine("Welcome to The Dark House, a Choose-Your-Own-Adventure Story!");
            WriteLine("You are investigating rumors of strange sights and sounds coming from an old house.");
            WriteLine("Will you find out the source of the problems? Will you survive the night? it all depends on what choices you make!");
            WriteLine("Press '1' to continue, '0' to quit:");

            var playerChoice = Int32.Parse(ReadLine());     // should convert input to an integer

            // var entryHall = new FirstFloor();

            if (playerChoice != 1)
            {
                return;
            }
            else
            {
                FirstFloor.entryway();
            }
        }
Ejemplo n.º 2
0
        public static void masterBedroom()
        {
            Console.Clear();
            WriteLine("You enter the Master Bedroom, and it is massive. ");
            WriteLine("Press 'Enter' to continue.");
            Console.ReadLine();
            WriteLine("There is a King-sized bed in the center of the room, with dark blue sheets, a blue and black comforter, and many pillows.\nLooking from the doorway, there is a large window on the right wall and a floor-to-near ceiling window on the wall opposite from you.");
            WriteLine("There is a large, walk-in closet in the far left corner of the room. \nThere is a large fan-and-light-fixture on the ceiling, above the bed, and a floor lamp next to the door.\nNext to the window on the right wall, there is a large wardrobe, about 7 feet tall. The doors of the wardrobe are closed but there are scratch marks on the front of them.");
            WriteLine("There are also some odds and ends around the room: some clothes on the floor, a small table next to the wardrobe, and some books on the bed. \nAs you walk around the room, you do notice a faint but foul odor. You cannot tell where the odor is coming from, though.");
            WriteLine("Press 'Enter' to continue.");
            Console.ReadLine();

            WriteLine("What do you do next?");

            WriteLine("1. Check the Closet\n2. Check the Wardrobe\n3. Check the Bed\n4. Leave the Master Bedroom\nAnything Else: Quit program");
            int masterBedroomChoice = Int32.Parse(ReadLine());

            Console.Clear();
            switch (masterBedroomChoice)
            {
            case 1:
                // closet
                WriteLine("You check the walk-in closet. There isn't much in there of interest.");
                WriteLine("Press 'Enter' to continue.");
                Console.ReadLine();
                masterBedroom();
                break;

            case 2:
                // Wardrobe
                Console.Clear();
                WriteLine("As you move towards the Wardrobe, that odor gets stronger. You grab the handles, open the door...");
                WriteLine("... and a body tumbles out!!");
                WriteLine("Press 'Enter' to continue.");
                Console.ReadLine();
                WriteLine("\nIt appears to be a man, at least 6 and half feet tall, with long, salt-and-pepper hair. His lower body seems fine - wearing gray slacks - but his upper body is a mess. Deep slashes cover his chest and mid-section. There is a deep gash between his left shoulder and neck - possibly a bite mark?. His face is frozen in a mix of fright and... recognition?");
                WriteLine("This is a very disturbing site! Do you stay in the Master Bedroom?");

                WriteLine("1. Yes\n2. No");
                int wardrobeChoice = Int32.Parse(ReadLine());

                if (wardrobeChoice != 1)
                {
                    FirstFloor.hallContinue();
                }
                else
                {
                    FirstFloor.masterBedroom();
                }
                break;

            case 3:
                // bed - BULLETS under bed
                WriteLine("There is nothing remarkable about the bed. \nHowever, as you take a glance UNDER the bed, you find a small box. Pulling out the box, you find SILVER BULLETS. You dump the bullets into your pants pockets; you might need these later.");
                WriteLine("Press 'Enter' to continue.");
                Console.ReadLine();
                masterBedroom();
                break;

            default:
                WriteLine("You have exited the program.");
                return;
            }
        }
Ejemplo n.º 3
0
        static void livingRoom()
        {
            Console.Clear();
            WriteLine("You enter the Living Room. If would have been a really nice living room, if it didn't look like it had been recently ramsacked.\n");
            WriteLine("A large couch, that once looked like it was up against the left wall, has been pulled out to the center of the room. A loveseat is laying on its side, next to the couch.\nThere is a mantle piece against the right wall. In front of the Mantle are the remains of what appears to be a coffee table - it looks like it was thrown against the mantle.");
            WriteLine("There is a door on the opposite side of the room from you; the door is damaged, as if someone - or something - kicked it open.");
            WriteLine("Press 'Enter' to continue.");
            Console.ReadLine();

            Console.WriteLine("\nWhat would you like to do?");
            Console.WriteLine("1. Search the Living Room\n2. Check the Mantle\n3. Check the Couch\n4. Check the Loveseat\n5. Head to the Damaged Door\n6. Head back to the Hall\nAnything Else: Quit program");

            var livingRoomChoice = Int32.Parse(ReadLine());

            Console.Clear();
            switch (livingRoomChoice)
            {
            case 1:
            {
                WriteLine("You do a search of the Living Room but find nothing of interest.");
                WriteLine("Press 'Enter' to continue.");
                Console.ReadLine();
                livingRoom();
                break;
            }

            case 2:
            {
                WriteLine("On the Mantle, you find a pamphlet: 'Reverse the Curse!'. There is a lot of occult information and drawings about various curses, their causes, and if they are reverseable.");
                WriteLine("One passage particularly catches your attention, as most of it is highlighted:");

                WriteLine("Press 'Enter' to continue.");
                Console.Clear();
                string[] lines = System.IO.File.ReadAllLines(@"pamphlet.txt");

                System.Console.WriteLine("Contents of WriteLines2.txt = ");
                foreach (string line in lines)
                {
                    Console.WriteLine("\t" + line);
                }

                // Keep the console window open in debug mode.
                Console.WriteLine("Press any key to exit.");
                System.Console.ReadKey();

                WriteLine("You pocket the disturbing pamphlet - it might be of use, later. You continue in the Living Room.");
                livingRoom();
                break;
            }

            case 3:
            {
                WriteLine("You search the Couch. There's nothing on the Couch but you see a silver-grey glint in between two of the cushions. Removing the cushions, you find a LOCKET.\nOpening the locket, you see a photograph of a tall man with dark hair and an equally tall woman with very dark red hair. \nOn the back of the Locket is an inscription: 'May you always be protected by love and family.'");
                WriteLine("You also notice that the Locket felt... warm... when you opened it. As you close the Locket, it goes back to a normal temperature. You slip the Locket around your neck, leave the Living Room, and return to the Hallway.");

                WriteLine("Press 'Enter' to continue.");
                Console.ReadLine();

                int protection = 1;         // signifying that the Locket was found; use in Final Battle
                FirstFloor.hall();
                break;
            }

            case 4:
            {
                WriteLine("You search the Loveseat. You find nothing under the cushions or in the back of the seat.");
                WriteLine("Press 'Enter' to continue.");
                Console.ReadLine();
                livingRoom();
                break;
            }

            case 5:
            {
                WriteLine("You force the Damaged Door open enough to squeeze through, and end up in a small hallway.");
                FirstFloor.smallerHall();
                break;
            }

            case 6:
            {
                WriteLine("You decide to head back to the Hallway.");
                FirstFloor.hall();
                break;
            }

            default:
                WriteLine("You have exited the program.");
                return;
            }
        }