static void Main(string[] args) { DuckSimulator simulator = new DuckSimulator(); AbstractDuckFactory factory = new CountingDuckFactory(); simulator.simulate(factory); }
public static void Main(string[] args) { Console.WriteLine("Compound Pattern Section In Head First Design Pattern"); AbstractDuckFactory duckFactory = new CountingDuckFactory(); DuckSimulator simulator = new DuckSimulator(); simulator.simulate(duckFactory); }
static void Main(string[] args) { DuckSimulator duckSimulator = new DuckSimulator(); AbstractDuckFactory duckFactory = new CountingDuckFactory(); duckSimulator.Simulate(duckFactory); Console.ReadLine(); }
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(); }