Exemplo n.º 1
0
        static void Main(string[] args)
        {
            var head = new YodaHead
            {
                EyeColor     = "Brown",
                HairColor    = "Blue",
                HasNose      = false,
                MouthIsOpen  = true,
                NumberOfEyes = 3
            };

            var torso = new YetiTorso();

            var legs = new ZombieLegs();

            var yodaYetiZombie = new Minifigure(head, torso, legs);

            yodaYetiZombie.Battle();

            var fatHead     = new FatHead();
            var pirateTorso = new PirateTorso(HandType.Hook);
            var centaurLegs = new CentaurLegs();

            var fatHeadedCentaurPirate = new Minifigure(fatHead, pirateTorso, centaurLegs);

            fatHeadedCentaurPirate.Battle();
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            var head = new YodaHead
            {
                EyeColor     = "Brown",
                HairColor    = "Blue",
                HasNose      = false,
                MouthIsOpen  = true,
                NumberOfEyes = 3
            };

            /* var fatHead = new FatHead();
             *
             * fatHead.Talk();
             */

            /*  switch (minifigure.Head)
             * {
             *    case YodaHead h:
             *        h.Battle();
             *        break;
             * }*/

            var torso = new YetiTorso();

            /* torso.Fight();
             * torso.Flex();*/

            var legs = new ZombieLegs();

            var drillsarge     = new DrillSarge();
            var yodaYetiZombie = new Minifigure(drillsarge, torso, legs);

            yodaYetiZombie.Battle();

            var fatHead     = new FatHead();
            var pirateTorso = new PirateTorso(HandType.Hook);
            var centaurLegs = new CentaurLegs();

            var fatHeadedCentaurPirate = new Minifigure(fatHead, pirateTorso, centaurLegs);

            fatHeadedCentaurPirate.Battle();

            var talkers = new List <ITalker>()
            {
                drillsarge, fatHead, head
            };

            foreach (var talker in talkers)
            {
                talker.Talk();
            }
        }
Exemplo n.º 3
0
        static void Main(string[] args)
        {
            var head = new YodaHead
            {
                EyeColor     = "Brown",
                HairColor    = "Blue",
                HasNose      = false,
                MouthIsOpen  = true,
                NumberOfEyes = 3,
            };

            //var minifigure = new Minifigure();
            //minifigure.Head = new YodaHead
            //{
            //    EyeColor = "Brown",
            //    HairColor = "Blue",
            //    HasNose = false,
            //    MouthIsOpen = true,
            //    NumberOfEyes = 3,
            //};

            //var fatHead = new FatHead();

            //fatHead.Talk();
            //minifigure.Head.Talk();

            //switch (minifigure.Head)
            //{
            //    case YodaHead h:
            //        h.Battle();
            //        break;
            //}

            var torso = new YetiTorso();
            var legs  = new ZombieLegs();
            //torso.Fight();
            //torso.Flex();

            var yodaYetiZombie = new Minifigure(head, torso, legs);

            yodaYetiZombie.Battle();

            //minifigure.Torso = torso;
            //minifigure.Torso.Fight();

            var fatHead     = new FatHead();
            var pirateTorso = new PirateTorso(HandType.Hook);
            var centaurLegs = new CentaurLegs();

            var fatHeadedCentaurPirate = new Minifigure(fatHead, pirateTorso, centaurLegs);

            fatHeadedCentaurPirate.Battle();
        }