Beispiel #1
0
        static void Main(string[] args)
        {
            Gun machineGun = new MachineGun();
            Gun shotGun    = new ShotGun();

            machineGun.Fire();
            shotGun.Fire();

            machineGun.Render();
            shotGun.Render();
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            Gun     machinegun     = new MachineGun();
            Gun     shotgun        = new ShotGun();
            GunClip clipMachineGun = new GunClip(machinegun);

            Console.WriteLine(clipMachineGun.Render());
            clipMachineGun.Fire();
            Console.WriteLine("\n");
            Console.WriteLine(shotgun.Render());
            shotgun.Fire();
        }