예제 #1
0
        static void Main(string[] args)
        {
            Console.WriteLine("                 V");
            Console.WriteLine("                /'>>>   Hello, I am your LLAMAGACHI! What would you like to do?!");
            Console.WriteLine("               /*/");
            Console.WriteLine("              / /");
            Console.WriteLine("             /*/");
            Console.WriteLine("            / /");
            Console.WriteLine("    -------/*/");
            Console.WriteLine(" --/  *  * */");
            Console.WriteLine("  /* * *  */");
            Console.WriteLine("  -  --- -/");
            Console.WriteLine("   H    H");
            Console.WriteLine("   H    H");
            Console.WriteLine("   --   --");


            Console.WriteLine("1. Feed me!");
            Console.WriteLine("2. Give me a drink!");
            Console.WriteLine("3. Play with me!");
            Console.WriteLine("4. Put me to sleep!");
            Console.WriteLine("5. Give me some medicine!");
            Console.WriteLine("6. Exit");

            int choice = Convert.ToInt32(Console.ReadLine());

            Pet myPet = new Pet(); //Object

            if (choice == 6)
            {
                Environment.Exit(0);
            }
            else if (choice == 1)
            {
                myPet.Time();
                myPet.FeedPet();
                myPet.Stats();
                myPet.Menu();
            }
            else if (choice == 2)
            {
                myPet.Time();
                myPet.GiveDrink();
                myPet.Stats();
                myPet.Menu();
            }
            else if (choice == 3)
            {
                myPet.Time();
                myPet.Play();
                myPet.Stats();
                myPet.Menu();
            }
            else if (choice == 4)
            {
                myPet.Time();
                myPet.PutToSleep();
                myPet.Stats();
                myPet.Menu();
            }
            else if (choice == 5)
            {
                myPet.Time();
                myPet.GiveMedicine();
                myPet.Stats();
                myPet.Menu();
            }
            else
            {
                Console.WriteLine("Please enter a valid menu option");
                myPet.Menu();
            }
            Console.ReadKey();
        }