Exemple #1
0
        }//shows user interactions with pet

        static void Tick(Pet playerPet, User Player)
        {
            int gamePlayMenuOption;

            //Creates Timer

            while (playerPet.OverallHealth > 2)
            {
                GamePlayValues(playerPet);
                GamePlayMenu(playerPet);
                gamePlayMenuOption = int.Parse(Console.ReadLine());
                if (gamePlayMenuOption == 1)
                {
                    playerPet.PetFeed();
                    playerPet.PetOverall();
                    Console.Clear();
                }
                else if (gamePlayMenuOption == 2)
                {
                    playerPet.PetLove();
                    playerPet.PetOverall();
                    Console.Clear();
                }
                else if (gamePlayMenuOption == 3)
                {
                    playerPet.PetPlay();
                    playerPet.PetOverall();
                    Console.Clear();
                }
                else if (gamePlayMenuOption == 4)
                {
                    playerPet.PetWater();
                    playerPet.PetOverall();
                    Console.Clear();
                }
                else if (gamePlayMenuOption == 5)
                {
                    playerPet.PetPotty();
                    playerPet.PetOverall();
                    Console.Clear();
                }
                else
                {
                    Console.WriteLine("I'm sorry, that was an invalid option.\nPress any key to try again.");
                    Console.ReadKey();
                    Console.Clear();
                }
            }
        }//takes user through the gameplay