示例#1
0
        public static void Kitchen()
        {
            if (HasVisit.kitchen)
            {
                Console.WriteLine(Label.KL);
            }
            else
            {
                Console.WriteLine(Desc.k1);
            }
            HasVisit.kitchen = true;
            String KeyIn  = Input.getInput();
            String Parsed = Input.Parser(KeyIn);

            if (KeyIn.Equals("take flask"))
            {
                if (Inventory.FlaskKitchen)
                {
                    Console.WriteLine("There isn't a flask here to take!");
                }
                else
                {
                    Console.WriteLine("you take the flask");
                    Inventory.flask = true;
                    AboveGround.Kitchen();
                }
            }
            else if (Parsed.Equals("east"))
            {
                AboveGround.Bedroom();
            }
            else if (Parsed.Equals("look"))
            {
                Console.WriteLine(Desc.k1);
                Kitchen();
            }
            else if (Parsed.Equals("quit"))
            {
                RunStat.IsRunning = false;
            }
            else if (Parsed.Equals("has been"))
            {
                HasVisit.Print();
                Kitchen();
            }
            else if (Parsed.Equals("inv"))
            {
                Inventory.ItemStatusPrint();
                Kitchen();
            }
            else if (Parsed.Equals("clr"))
            {
                Console.Clear();
                GC.Collect();
                Kitchen();
            }
            else
            {
                Console.WriteLine("You look around confused.");
                Kitchen();
            }
        }
示例#2
0
        public static void Bedroom()
        {
            if (HasVisit.bedroom)
            {
                Console.WriteLine(Label.BL);
            }
            else
            {
                Console.WriteLine(Desc.b1);
            }
            HasVisit.bedroom = true;
            String KeyIn  = Input.getInput();
            String Parsed = Input.Parser(KeyIn);

            if (KeyIn.Equals("take bottle"))
            {
                if (Inventory.FlareGunN1Taken)
                {
                    Console.WriteLine("There isn't a flare gun here to take!");
                }
                else
                {
                    Console.WriteLine("You take the bottle");
                    Inventory.bottle = true;
                    AboveGround.Bedroom();
                }
            }
            else if (KeyIn.Equals("take bag") || KeyIn.Equals("take sack") || KeyIn.Equals("take wool sack"))
            {
                if (Inventory.FlareGunN1Taken)
                {
                    Console.WriteLine("There isn't a flare gun here to take!");
                }
                else
                {
                    Console.WriteLine("You take the wool sack");
                    Inventory.sack = true;
                    AboveGround.Bedroom();
                }
            }
            else if (KeyIn.Equals("go left"))
            {
                Closet();
            }
            else if (Parsed.Equals("look"))
            {
                if (Inventory.bottle)
                {
                    Console.WriteLine(Desc.b2);
                }
                else if (Inventory.sack)
                {
                    Console.WriteLine(Desc.b3);
                }
                else if (Inventory.sack && Inventory.bottle)
                {
                    Console.WriteLine(Desc.b4);
                }
                else
                {
                    Console.WriteLine(Desc.b1);
                }
            }
            else if (Parsed.Equals("quit"))
            {
                RunStat.IsRunning = false;
            }
            else if (Parsed.Equals("has been"))
            {
                HasVisit.Print();
                Bedroom();
            }
            else if (Parsed.Equals("inv"))
            {
                Inventory.ItemStatusPrint();
                Bedroom();
            }
            else if (Parsed.Equals("back") || Parsed.Equals("west"))
            {
                AboveGround.Kitchen();
                Bedroom();
            }
            else if (KeyIn.Equals("clear"))
            {
                Console.Clear();
                GC.Collect();
                Bedroom();
            }
            else
            {
                Console.WriteLine("You look around confused.");
                Bedroom();
            }
        }