Example #1
0
        public static void main()
        {
            Console.Clear();
            Console.WriteLine("-----Ted The Turtle-----");
            Console.WriteLine("1. Talk to");
            Console.WriteLine("2. Feed");
            Console.WriteLine("3. Product info");
            var  userselect1 = Console.ReadLine();
            bool quit        = false;

            //do while loop for option selection
            //  do
            //  {

            if (userselect1 == "1")
            {
                TedTheTurtle.speak();
            }
            else if (userselect1 == "2")
            {
                TedTheTurtle.feed();
            }
            else if (userselect1 == "3")
            {
                TedTheTurtle.product();
            }
            else
            {
                Console.WriteLine("Sorry I dont understand your selection");
                Console.WriteLine("Try again");
                Console.ReadKey();
                Console.Clear();
            }
        }
Example #2
0
        public static void intro()
        {
            bool quit = false;

            do
            {
                Console.WriteLine("******Welcome to the Farm******");
                Console.WriteLine("1. Harry the Horse");
                Console.WriteLine("2. Ted the Turtle");
                Console.WriteLine("3. Pinky the pig");
                Console.WriteLine("4. Daffy the duck");
                Console.WriteLine("5. Ron the farmer");
                var userselection = Console.ReadLine();
                if (userselection == "1")
                {
                    HarryTheHorse.main();
                }
                else if (userselection == "2")
                {
                    TedTheTurtle.main();
                }
                else if (userselection == "3")
                {
                    PinkyThePig.main();
                }
                else if (userselection == "4")
                {
                    DaffyTheDuck.main();
                }
                else if (userselection == "5")
                {
                    Ron.main();
                }
                else
                {
                    Console.WriteLine("Sorry I dont understand your selection");
                    Console.WriteLine("Try again");
                    Console.ReadKey();
                    Console.Clear();
                }
            }while (!quit);
        }