Exemple #1
0
        public static List <string> Userfood = new List <string>();  // creating list of food
        static void Main(string[] args)
        {
            // creating objects
            TestGame progobj      = new TestGame();
            Setup    setupobj     = new Setup();
            Outside  outsideobj   = new Outside();
            House    houseobj     = new House();
            Level1   lvl1obj      = new Level1();
            Level2   lvl2obj      = new Level2();
            Creature creatureobj  = new Creature();
            Creature creature2obj = new Creature();
            Config   configobj    = new Config();

            houseobj.randomfood = new Random();
            houseobj.outsideobj = outsideobj;
            CokeMan  cokeobj  = new CokeMan(3);
            PepsiMan pepsiobj = new PepsiMan(5);
            Level3   lvl3obj  = new Level3();


            // calling the methods
            setupobj.GetName();
            setupobj.AskUser();
            setupobj.UserFoodInput();
            setupobj.Intro();
            outsideobj.OutsideHouse();
            creatureobj.feet = setupobj.GetUserNums;
            creatureobj.AnimalGreeting();
            creatureobj.ChooseStatement();
            outsideobj.DifferentDoors();
            houseobj.setupobj = setupobj;
            houseobj.GetLastName();
            houseobj.HouseLevel();

            // create 5 same methods for the 5 different rooms
            houseobj.ChooseDoor();
            if (configobj.DiceMethod() == true)
            {
                Level1.Basement();
            }
            else
            {
                configobj.GameEnd();
            }
            lvl1obj.FirstArea();
            lvl1obj.FirstArea2();
            lvl1obj.FirstArea3();
            lvl2obj.WhichMonster();
            lvl3obj.Lvl3();
        }
Exemple #2
0
        // third part of area 1
        // while loop for invalid answer
        public void FirstArea3()
        {
            Config configobj = new Config();

            Console.BackgroundColor = ConsoleColor.White;
            Console.ForegroundColor = ConsoleColor.Blue;
            Console.WriteLine("You're almost there! You're right below the Buddha stone. You just need to find a way to get up there.");
            Console.WriteLine("Perhaps you could use materials on the wall?");
            Console.ResetColor();
            Console.Write("The wall has (L)adder, (R)ope, (S)piderweb Gadget Thing, (Q)uit: ");
            string chooseobject = Console.ReadLine().ToUpper();

            while (chooseobject != "S" && chooseobject != "Q" && chooseobject != "L" && chooseobject != "R")
            {
                Console.Write("The wall has (L)adder, (R)ope, (S)piderweb Gadget Thing, (Q)uit: ");
                chooseobject = Console.ReadLine().ToUpper();
            }
            switch (chooseobject)
            {
            case "L":
                Console.BackgroundColor = ConsoleColor.White;
                Console.ForegroundColor = ConsoleColor.Blue;
                Console.WriteLine("You place the ladder and start climbing up. After three-quarters of the way you hear hissing sound coming from the Buddha figurine. You didn't care and kept climbing. You reached the Buddha figurine! Just as you were about to touch it a giantic spider popped up from the figurine and sucked up your blood.");
                Console.ResetColor();
                Environment.Exit(0);
                break;

            case "R":
                Console.BackgroundColor = ConsoleColor.White;
                Console.ForegroundColor = ConsoleColor.Blue;
                Console.WriteLine("You used a rope and threw the other end towards the figurine. You begin to pull yourself up but then realize you were too heavy. The rope snapped and you fell down. The loud thud noise lured many spiders around you. The spiders begin to surround you ate trap you in their webs. Eventually you get spun up into a cocoon and stay in the state of crysalis forever.");
                Console.ResetColor();
                Environment.Exit(0);
                break;

            case "S":
                Console.BackgroundColor = ConsoleColor.White;
                Console.ForegroundColor = ConsoleColor.Blue;
                Console.WriteLine("You used the Spiderweb Gadget Thing and got the web onto the Buddha figurine. When you use the Gadget, many mini spiders pop up. The mini spiders form together and pick you up towards the figure. After a few seconds you reached the figure and tapped onto it. The figure begins to glow and glow.");
                Console.ResetColor();
                lvl2obj.WhichMonster();
                break;

            case "Q":
                configobj.GameEnd();
                break;
            }
        }