Exemple #1
0
        public void Zzz2(game G, Dog d, fun f, House h)
        {
            ConsoleKeyInfo oof = ReadKey();

            if (oof.Key == ConsoleKey.Y)
            {
                WriteLine("Great! Now you're rested too!");
                ForegroundColor = ConsoleColor.Green;
                WriteLine("+1 dogtreat");
                ResetColor();
                ReadKey();
                d.dogtreats++;
                Bedroom(G, f, d, h);
            }

            else if (oof.Key == ConsoleKey.N)
            {
                WriteLine("Oh no!! You overslept and its dark out. You missed your perfect walk");
                ForegroundColor = ConsoleColor.Red;
                WriteLine("GAME OVER");
                ReadKey();
                ResetColor();
                Clear();
                Environment.Exit(0);
            }
            else
            {
                WriteLine("Invalid Input");
                Zzz2(G, d, f, h);
            }
        }
Exemple #2
0
        public void RedBull(game G, fun f, Dog d, House h)
        {
            WriteLine("Take a Redbull? Y/N");
            ConsoleKeyInfo bull = ReadKey();

            if (bull.Key == ConsoleKey.Y)
            {
                WriteLine("Your walk is sure to be longer now!");
                ForegroundColor = ConsoleColor.Green;
                WriteLine("+1 dogtreat");
                ResetColor();
                d.dogtreats++;
                ReadKey();
            }
            else if (bull.Key == ConsoleKey.N)
            {
                WriteLine("Those have way too much caffine. Unhealthy.");
                ReadKey();
            }
            else
            {
                WriteLine("Invalid Input");
                RedBull(G, f, d, h);
            }
        }
Exemple #3
0
        public void MaybeDogTreat(game G, Dog d, fun f, House h)
        {
            WriteLine("You open the pantry. You see your dog food, but its all sealed up. But wait! There's one lone treat on the ground. Eat it? Y/N");
            ConsoleKeyInfo treat = ReadKey();

            ReadKey();
            if (treat.Key == ConsoleKey.Y)
            {
                WriteLine("You eat the mystery treat");
                WriteLine("....................");
                WriteLine("..................................");
                WriteLine(".....................................................");
                WriteLine("it wasn't a dog treat. It was a peice of sponge.");
                ForegroundColor = ConsoleColor.Red;
                WriteLine("+1 Bad Dog Point");
                ResetColor();
                ReadKey();
                d.baddog++;
            }
            else if (treat.Key == ConsoleKey.N)
            {
                WriteLine("Probably for the best");
                ForegroundColor = ConsoleColor.Green;
                WriteLine("+1 dogtreat");
                ResetColor();
                ReadKey();
                d.dogtreats++;
            }
            else
            {
                WriteLine("Invalid Input");
                MaybeDogTreat(G, d, f, h);
            }
        }
Exemple #4
0
        public int Dresser(game G, Dog d, fun f, House h)
        {
            ConsoleKeyInfo open = ReadKey();

            ReadKey();
            if (open.Key == ConsoleKey.Y)
            {
                WriteLine("wow, perv.");
                ForegroundColor = ConsoleColor.Red;
                WriteLine("+1 Bad Dog Point");
                ResetColor();
                d.baddog++;
                ReadKey();
                Bedroom(G, f, d, h);
            }
            else if (open.Key == ConsoleKey.N)
            {
                WriteLine("Way to respect privacy");
                ReadKey();
                Bedroom(G, f, d, h);
            }
            else
            {
                WriteLine("Invalid input");
                Dresser(G, d, f, h);
            }
            return(0);
        }
Exemple #5
0
        public void Hamper(game g, Dog d, fun f, House h)
        {
            ConsoleKeyInfo clothes = ReadKey();

            ReadKey();
            if (clothes.Key == ConsoleKey.Y)
            {
                WriteLine("You root through the dirty laundry. Its horrible. But after some digging you see it. Could it be?");
                ForegroundColor = ConsoleColor.DarkBlue;
                WriteLine("Maybe");
                ForegroundColor = ConsoleColor.Blue;
                WriteLine("IT IS!!!!!");
                ForegroundColor = ConsoleColor.Cyan;
                ResetColor();
                WriteLine("You found the leash! Now you can go back to your human and have a great walk!");
                ReadKey();
                End(d);
            }

            else if (clothes.Key == ConsoleKey.N)
            {
                WriteLine("Too nasty. Pass.");
                ReadKey();
                Bathroom(g, f, d, h);
            }
            else
            {
                WriteLine("Invalid Input");
                Hamper(g, d, f, h);
            }
        }
Exemple #6
0
 public void NameCharacter(game G, fun f, Dog d, House h)
 {
     WriteLine("Let's start by naming your dog!");
     dog.name = ReadLine();
     Clear();
     if (dog.name == "Lenny")
     {
         WriteLine("Hey! Thats my dogs name!");
         ForegroundColor = ConsoleColor.Green;
         WriteLine("+1 dogtreat");
         dog.dogtreats++;
         ResetColor();
         ReadKey();
         Clear();
     }
     else if (dog.name == "Austin")
     {
         WriteLine("Hey! Thats my dogs name!");
         ForegroundColor = ConsoleColor.Green;
         WriteLine("+1 dogtreat");
         dog.dogtreats++;
         ResetColor();
         ReadKey();
         Clear();
     }
     else if (dog.name == "Hank")
     {
         WriteLine("Well that's my axolotl's name. But I guess I'll allow it, press any key to continue.");
         ForegroundColor = ConsoleColor.Green;
         WriteLine("+1 dogtreat");
         ResetColor();
         dog.dogtreats++;
         ReadKey();
     }
     else
     {
         WriteLine("Alright " + dog.name + " press any key to begin!");
         ReadKey();
         Clear();
     }
     Write("You wake up from your afternoon nap to the sound of jingling keys. It's your best friend! They're finally home! You rush to the door to say hello, and amist all your excitement you make out one of your FAVORITE WORDS");
     ReadKey();
     Clear();
     ForegroundColor = ConsoleColor.Blue;
     Write("'You wanna go for a W-A-L-K?'");
     ReadKey();
     ResetColor();
     WriteLine(" they say. Your tail wags with excitement.");
     ReadKey();
     Clear();
     ForegroundColor = ConsoleColor.Blue;
     WriteLine("'Huh. That's odd...'");
     WriteLine("'I could've sworn I left the leash by the door. Can you find it?");
     ReadKey();
     ResetColor();
     RoomChoice1(G, f, d, h);
 }
Exemple #7
0
 public void CouchChange(game G, fun f, Dog d, House h)
 {
     WriteLine("You look in the couch cushions and find $2 in quarters. Maybe your human will buy you a snack!");
     ForegroundColor = ConsoleColor.Green;
     WriteLine("+1 dogtreat");
     ResetColor();
     d.dogtreats++;
     ReadKey();
     h.LivingRoom(G, f, d, h);
 }
Exemple #8
0
 public void StartGame(game G, fun f, Dog d, House h)
 {
     Clear();
     WriteLine("Welcome to Dog Walk! Play as a dog and find your leash! " + "Press Enter to continue");
     while (ReadKey().Key != ConsoleKey.Enter)
     {
     }
     Clear();
     NameCharacter(G, f, d, h);
 }
Exemple #9
0
 public void uhoh(game G, fun f, Dog d, House h)
 {
     WriteLine("You tug the leash, only to realize its a TV plug! Its already too late. The TV is shattered on the floor. Someone's in the doghouse now.");
     ForegroundColor = ConsoleColor.Red;
     WriteLine("+2 Bad Dog Points");
     ResetColor();
     d.baddog++;
     d.baddog++;
     ReadKey();
     h.LivingRoom(G, f, d, h);
 }
Exemple #10
0
 public void Credits(game G, fun f, Dog d, House h)
 {
     Clear();
     WriteLine("Game developed by Maura Reilly");
     WriteLine("Uses assets from: ");
     WriteLine("Programming is Fun Adventure Game tutorials");
     WriteLine("Professor Mike Hadley's keyboard controlled menu");
     WriteLine("while key referenced from Microsoft");
     WriteLine("and made with some tutoring assistance from Ishan Dutta, Brendan Lienau, Rafael Santana, and Janell");
     WriteLine("Title asset from http://patorjk.com/software/taag/#p=moreopts&f=ANSI%20Shadow&t=Dog%20Walk!!");
     WriteLine("AASCII dog by unknown artist from https://www.asciiart.eu/animals/dogs");
     WriteLine("Press any key to return to menu");
     ReadKey(true);
     MainMenu(G, f, d, h);
 }
Exemple #11
0
        public void RoomChoice1(game G, fun f, Dog d, House h)
        {
            Clear();
            WriteLine("Which room do you search?");
            WriteLine("A: Living Room");
            WriteLine("B: Kitchen");
            WriteLine("C: Bedroom");
            WriteLine("D: Bathroom");
            WriteLine("You have " + dog.dogtreats + " dogtreats and " + dog.baddog + " bad dog points.");
            ConsoleKeyInfo roomkey = ReadKey();

            ReadLine();
            if (roomkey.Key == ConsoleKey.A)
            {
                house.LivingRoom(G, f, d, h);
                Clear();
            }
            else if (roomkey.Key == ConsoleKey.B)
            {
                house.Kitchen(G, f, d, h);
                Clear();
            }
            else if (roomkey.Key == ConsoleKey.C)
            {
                int sf = house.Bedroom(G, f, d, h);
                if (sf == 2)
                {
                    RoomChoice1(G, f, d, h);
                }
                Clear();
            }
            else if (roomkey.Key == ConsoleKey.D)
            {
                house.Bathroom(G, f, d, h);
                int next = house.Bedroom(G, f, d, h);
                if (next == 1)
                {
                    house.Dresser(G, d, f, h);
                }
                Clear();
            }
            else
            {
                WriteLine("Invalid input");
                RoomChoice1(G, f, d, h);
            }
        }
Exemple #12
0
        public int Kitchen(game G, fun f, Dog d, House h)
        {
            Clear();
            WriteLine("You make your way to the kitchen");
            WriteLine("What area would you like to search?");
            WriteLine(" A: Fridge");
            WriteLine(" B: Sink");
            WriteLine(" C: Pantry");
            WriteLine(" D: Leave Kitchen");
            ConsoleKeyInfo kitchen = ReadKey();

            ReadKey();
            if (kitchen.Key == ConsoleKey.A)
            {
                Clear();
                WriteLine("You open up the fridge. Nothing in here but a six pack of Redbull and a half empty pickle jar.");
                WriteLine("Jeez. Your human lives like this?");
                f.RedBull(G, f, d, h);
                Kitchen(G, f, d, h);
            }
            else if (kitchen.Key == ConsoleKey.B)
            {
                Clear();
                WriteLine("Seems like you've tried everything INCLUDING the kitchen sink. Except you clearly haven't. You're still playing this game.");
                ReadKey();
                Kitchen(G, f, d, h);
            }
            else if (kitchen.Key == ConsoleKey.C)
            {
                Clear();
                f.MaybeDogTreat(G, d, f, h);
                Kitchen(G, f, d, h);
            }
            else if (kitchen.Key == ConsoleKey.D)
            {
                Clear();
                G.RoomChoice1(G, f, d, h);
            }
            else
            {
                WriteLine("Invalid input");
                Kitchen(G, f, d, h);
            }
            return(0);
        }
Exemple #13
0
        public void MainMenu(game G, fun f, Dog d, House h)
        {
            string prompt = @"
██████╗  ██████╗  ██████╗     ██╗    ██╗ █████╗ ██╗     ██╗  ██╗██╗██╗
██╔══██╗██╔═══██╗██╔════╝     ██║    ██║██╔══██╗██║     ██║ ██╔╝██║██║
██║  ██║██║   ██║██║  ███╗    ██║ █╗ ██║███████║██║     █████╔╝ ██║██║
██║  ██║██║   ██║██║   ██║    ██║███╗██║██╔══██║██║     ██╔═██╗ ╚═╝╚═╝  
██████╔╝╚██████╔╝╚██████╔╝    ╚███╔███╔╝██║  ██║███████╗██║  ██╗██╗██╗
╚═════╝  ╚═════╝  ╚═════╝      ╚══╝╚══╝ ╚═╝  ╚═╝╚══════╝╚═╝  ╚═╝╚═╝╚═╝ 
                         |\_/|                  
                         | @ @    
                         |   <>              _  
                         |  _/\------____   | |
                         |               `--' |   
                       __|_       ___|   |___.' 
                    /_/_____/____/_______|                       
";

            string[] choices = { "Start", "Credits", "Exit" };
            Menu     m       = new Menu(prompt, choices);

            Title = "Dog Walk!";
            int Chosen = m.Run();

            switch (Chosen)
            {
            case 0:
                StartGame(G, f, d, h);
                break;

            case 1:
                Credits(G, f, d, h);
                break;

            case 2:
                Environment.Exit(0);
                break;
            }
        }
Exemple #14
0
        public void Zzz(game G, Dog d, fun f, House h)
        {
            ConsoleKeyInfo sleepy = ReadKey();

            ReadKey();
            if (sleepy.Key == ConsoleKey.Y)
            {
                WriteLine("You settle in and close your eyes for a quick rest. Ah luxury... Wake up? Y/N");
                Zzz2(G, d, f, h);
            }

            else if (sleepy.Key == ConsoleKey.N)
            {
                WriteLine("Probably a good choice");
                ReadKey();
                Bedroom(G, f, d, h);
            }
            else
            {
                WriteLine("Invalid Input");
                Zzz(G, d, f, h);
            }
        }
Exemple #15
0
        public int Bathroom(game G, fun f, Dog d, House h)
        {
            Clear();
            WriteLine("You enter the bathroom. Where do you look?");
            WriteLine("" +
                      " A: Toilet" +
                      " B: Under sink" +
                      " C: Laundry Hamper" +
                      " D: Leave Bathroom");
            ConsoleKeyInfo bathroom = ReadKey();

            ReadLine();

            if (bathroom.Key == ConsoleKey.A)
            {
                Clear();
                WriteLine("You look inside the toilet bowl. Nothing here but water. Drink? Y/N");
                ConsoleKeyInfo drink = ReadKey();
                ReadLine();
                if (drink.Key == ConsoleKey.Y)
                {
                    WriteLine("You lap up some of the toilet water. You're disgusting.");
                    ReadKey();
                    ForegroundColor = ConsoleColor.Red;
                    WriteLine("+1 Bad Dog Point");
                    ResetColor();
                    d.baddog++;
                    ReadKey();
                    Clear();
                    Bathroom(G, f, d, h);
                }
                else if (drink.Key == ConsoleKey.N)
                {
                    WriteLine("thank god.");
                    ReadKey();
                    Clear();
                    Bathroom(G, f, d, h);
                }
                else
                {
                    WriteLine("Invalid input");
                    Bathroom(G, f, d, h);
                }
            }

            if (bathroom.Key == ConsoleKey.B)
            {
                Clear();
                WriteLine("You push open the cabinet door. Nothing but cleaner in here.");
                ReadKey();
                Bathroom(G, f, d, h);
            }
            else if (bathroom.Key == ConsoleKey.C)
            {
                Clear();
                WriteLine("You knock over the hamper in the corner. It reeks. Yikes. Root through it? Y/N");
                Hamper(G, d, f, h);
            }
            else if (bathroom.Key == ConsoleKey.D)
            {
                Clear();
                G.RoomChoice1(G, f, d, h);
            }
            else
            {
                WriteLine("Invalid input");
                Bathroom(G, f, d, h);
            }
            return(0);
        }
Exemple #16
0
        public int LivingRoom(game G, fun f, Dog d, House h)
        {
            Clear();
            WriteLine("You enter the living room. Where do you look?");
            WriteLine(
                " A: Couch" +
                " B: Chair" +
                " C: TV Stand" +
                " D: Leave Living Room");
            ConsoleKeyInfo livingroom = ReadKey();

            ReadLine();

            if (livingroom.Key == ConsoleKey.A)
            {
                Clear();
                WriteLine("You jump on the couch and hear a jingle. Investigate? Y/N");
                ConsoleKeyInfo couch = ReadKey();
                ReadLine();
                if (couch.Key == ConsoleKey.Y)
                {
                    f.CouchChange(G, f, d, h);
                    LivingRoom(G, f, d, h);
                }
                else if (couch.Key == ConsoleKey.N)
                {
                    WriteLine("You didn't find anything.");
                    ReadKey();
                    LivingRoom(G, f, d, h);
                }
                else
                {
                    WriteLine("Invalid Input");
                    LivingRoom(G, f, d, h);
                }
            }
            else if (livingroom.Key == ConsoleKey.B)
            {
                Clear();
                WriteLine("You look under the chair. Empty.");
                ReadKey();
                ForegroundColor = ConsoleColor.Red;
                WriteLine("WAIT!!");
                ResetColor();
                ReadKey();
                WriteLine("Nope, sorry, thought I saw it but it was just some loose fabric");
                ReadKey();
                LivingRoom(G, f, d, h);
            }
            else if (livingroom.Key == ConsoleKey.C)
            {
                Clear();
                WriteLine("You look behind the TV and see something. Hey!! That might be it!!");
                WriteLine("Pull? Y/N");
                ConsoleKeyInfo pull = ReadKey();
                ReadKey();

                if (pull.Key == ConsoleKey.Y)
                {
                    f.uhoh(G, f, d, h);
                }
                else if (pull.Key == ConsoleKey.N)
                {
                    WriteLine("You're about to tug on the leash, when you suddenly realize its a TV cord!! Thank God you didn't pull");
                    ForegroundColor = ConsoleColor.Green;
                    WriteLine("+1 dogtreat");
                    ResetColor();
                    d.dogtreats++;
                    ReadKey();
                    LivingRoom(G, f, d, h);
                }
                else
                {
                    WriteLine("Invalid input");
                    LivingRoom(G, f, d, h);
                }
            }
            else if (livingroom.Key == ConsoleKey.D)
            {
                Clear();
                G.RoomChoice1(G, f, d, h);
            }
            else
            {
                WriteLine("Invalid Input");
                LivingRoom(G, f, d, h);
            }
            return(0);
        }
Exemple #17
0
        public int Bedroom(game G, fun f, Dog d, House h)
        {
            Clear();
            WriteLine("You enter the bedroom. Where do you look?");
            WriteLine("" +
                      "A: Nightstand" +
                      " B: Bed" +
                      " C: Dresser" +
                      " D: Leave Bedroom");
            ConsoleKeyInfo bedroom = ReadKey();

            ReadKey();

            if (bedroom.Key == ConsoleKey.A)
            {
                Clear();
                WriteLine("You look on top of the nightstand. There's no leash, but you find your human's fitbit! Take? Y/N");
                ConsoleKeyInfo fitbit = ReadKey();
                ReadKey();
                if (fitbit.Key == ConsoleKey.Y)
                {
                    WriteLine("As you grab the fitbit you realize its long dead. Oh well. Its the thought that counts, right?");
                    ForegroundColor = ConsoleColor.Green;
                    WriteLine("+1 dogtreat");
                    ResetColor();
                    d.dogtreats++;
                    ReadKey();
                    Bedroom(G, f, d, h);
                }
                else if (fitbit.Key == ConsoleKey.N)
                {
                    WriteLine("You know your human never uses it anyway.");
                    ReadKey();
                    Bedroom(G, f, d, h);
                }
                else
                {
                    WriteLine("Invalid input");
                    Bedroom(G, f, d, h);
                }
            }
            else if (bedroom.Key == ConsoleKey.B)
            {
                Clear();
                WriteLine("You hop onto the middle of the bed, as per usual. You dont see anything, but it's really comfy.");
                WriteLine("Hmm couldn't hurt to take a quick nap, could it? Y/N");
                Zzz(G, d, f, h);
            }
            else if (bedroom.Key == ConsoleKey.C)
            {
                Clear();
                WriteLine("One of the drawers is slightly open. Look inside? Y/N");
                Dresser(G, d, f, h);
            }
            else if (bedroom.Key == ConsoleKey.D)
            {
                Clear();
                G.RoomChoice1(G, f, d, h);
            }
            else
            {
                WriteLine("Invalid input");
                Bedroom(G, f, d, h);
            }
            return(0);
        }