static void Main(string[] args) { Giant greenGiant = new Giant(); GiantAdapter catapultGiant = new GiantAdapter(greenGiant); Giant hulk = new Giant(); Catapult stoneLauncher = new Catapult(); CatapultBrigade catapultBrigade = new CatapultBrigade(); catapultBrigade.AddCatapult(catapultGiant); catapultBrigade.AddCatapult(stoneLauncher); catapultBrigade.LoadCommand(); catapultBrigade.LaunchCommand(); hulk.Smash(); Console.ReadKey(); }
public GiantAdapter(Giant giant) { this.giant = giant; }