static void Main(string[] args)
        {
            var head        = new NathanHead();
            var reptileBody = new ReptilianTorso();

            reptileBody.Color = "Brown";
            var babyLegs = new BabyLegs();

            babyLegs.Length    = 19;
            babyLegs.MainColor = "purple";
            babyLegs.ShoeColor = "yellow";

            var bestTeacher = new Minifigure("Nathan", head, reptileBody, babyLegs);

            bestTeacher.Greet(new Person {
                Name = "Bob"
            });

            var head2    = new MartinHead();
            var birdBody = new BirdTorso();

            birdBody.Color = "pink";
            var manLegs = new Legs.Legs();

            manLegs.Length    = 10;
            manLegs.MainColor = "blue";
            manLegs.ShoeColor = "brown";

            var martin = new Minifigure("Martin", head2, birdBody, manLegs);

            martin.Greet(bestTeacher);

            bestTeacher.Karate(martin);

            martin.TakeABreak();
            bestTeacher.TakeABreak();

            var pastor = new Pastor()
            {
                Name = "Honorable Rev. Eugene Babylegs III"
            };

            var greeters = new List <IGreeter> {
                pastor, bestTeacher, martin
            };

            foreach (var greeter in greeters)
            {
                greeter.Greet(pastor);
            }

            Console.ReadLine();
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            var head        = new NathanHead();
            var reptileBody = new ReptilianTorso();

            reptileBody.Color = "Brown";

            var figure = new Minifigure(head, reptileBody);

            figure.Greet();
            figure.TakeABreak();

            Console.ReadLine();
        }
Esempio n. 3
0
        static void Main(string[] args)
        {
            var myDogHead = new Dog();

            myDogHead.Talk();

            var martinHead = new Bald();
            var notAnAstro = new Astronaut();

            var fitTorso = new FitTorso(2);

            fitTorso.Crunch(12);

            var adamsLegs = new OrangeLegs(Length.Short);

            var minifigure = new Minifigure("Adam", martinHead, fitTorso, adamsLegs);

            minifigure.Greet();

            Console.ReadLine();
        }
Esempio n. 4
0
        static void Main(string[] args)
        {
            var head        = new NathanHead();
            var reptileBody = new ReptilianTorso();

            reptileBody.Color = "Brown";
            var babyLegs = new BabyLegs();

            babyLegs.Length    = 19;
            babyLegs.MainColor = "purple";
            babyLegs.ShoeColor = "yellow";

            var bestTeacher = new Minifigure("Nathan", head, reptileBody, babyLegs);

            bestTeacher.Greet();

            var head2    = new MartinHead();
            var birdBody = new BirdTorso();

            birdBody.Color = "pink";
            var manLegs = new Legs.Legs();

            manLegs.Length    = 10;
            manLegs.MainColor = "blue";
            manLegs.ShoeColor = "brown";

            var martin = new Minifigure("Martin", head2, birdBody, manLegs);

            martin.Greet();

            bestTeacher.Karate(martin);

            martin.TakeABreak();
            bestTeacher.TakeABreak();

            Console.ReadLine();
        }
Esempio n. 5
0
 public void Karate(Minifigure target)
 {
     _legs.Kick(target);
 }