Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            DuckSimulator       duckSimulator = new DuckSimulator();
            AbstractDuckFactory duckFactory   = new CountingDuckFactory();

            duckSimulator.Simulate(duckFactory);


            Console.ReadLine();
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            DuckSimulator simulator = new DuckSimulator();

            //simulator.Simulate(new DuckFactory());

            simulator.Simulate(new CountingDuckFactory());

            Console.ReadLine();
        }
        private static void Main()
        {
            var simulator = new DuckSimulator();

            simulator.Simulate();
            simulator.SimulateWithCounter();
            simulator.SimulateUsingFactory(new CountingDuckFactory());
            simulator.SimulateFlock(new CountingDuckFactory());
            simulator.SimulateFlockWithObserver(new CountingDuckFactory());
            Console.ReadKey();
        }