Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            Animal Horse = new Horse(new Idle(), AnimalType.Horse);
            Animal Cow   = new Cow(new Idle(), AnimalType.Cow);

            Console.WriteLine("Starting Simulation");
            Console.Write("\nPress 'Enter' to exit ");
            int iterator = 0;

            //Console.ReadKey(true).Key != ConsoleKey.Enter not working on Linux :(
            while (iterator < 10)
            {
                Horse.DisplayCurrentState();
                Horse.ChangeActivity();

                Cow.DisplayCurrentState();
                Cow.ChangeActivity();

                iterator++;
            }
        }