示例#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();
        }
示例#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();
            }
        }
示例#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();
        }
示例#4
0
        static void Main(string[] args)
        {
            var newHead = new YodaHead
            {
                EyeColor     = "Brown",
                HairColor    = "Blue",
                HasNose      = true,
                MouthIsOpen  = true,
                NumberOfEyes = 2
            };

            var newLegs = new CentaurLegs()
            {
            }


            var minifigure = new Minifigure(newHead);

            minifigure.Battle();

            var fatHead = new FatHead();

            fatHead.Talk();
            minifigure.Head.Talk();
            Console.WriteLine(fatHead.EyeColor, "this is eye color");


            var vaderHead = new VaderHead
            {
                EyeColor     = "Brown",
                HairColor    = "Blue",
                HasNose      = true,
                MouthIsOpen  = true,
                NumberOfEyes = 2
            };
            var newminifigure = new Minifigure(vaderHead);
        }
示例#5
0
        static void Main(string[] args)
        {
            var myHead  = new FatHead();
            var myTorso = new YetiTorso();

            var myLegs = new CentaurLegs();

            var myFigure = new Minifigure(myHead, myTorso, myLegs);

            myFigure.Battle();

            var yodaHead = new YodaHead()
            {
                EyeColor     = "Green",
                HairColor    = "White",
                HasNose      = true,
                MouthIsOpen  = false,
                NumberOfEyes = 2,
            };
            var yodaLegs  = new PirateLegs();
            var yodaTorso = new YetiTorso();
            var yoda      = new Minifigure(yodaHead, yodaTorso, yodaLegs);

            yoda.Battle();

            var fatheadDrill = new Minifigure();

            var talkers = new List <ITalker>()
            {
            };
            // foreach (var talker in talkers)
            // {
            //  talkers.Talk();
            // }


            //
            {
                /*
                 * var yoda = new Minifigure();
                 * var fatHead = new FatHead();
                 *
                 * fatHead.Talk();
                 * yoda.Head.Talk();
                 *
                 * // yoda.Head.Battle();
                 *
                 * fatHead.Think();
                 * yoda.Head.Think();
                 *
                 * var vadar = new DarthVadarHead();
                 *
                 * vadar.Talk();
                 *
                 * var pirate = new PirateTorso(HandType.Hook);
                 *
                 * switch (yoda.Head)
                 * {
                 *  case YodaHead yodaHead:
                 *      yodaHead.Battle();
                 *      break;
                 * }
                 *
                 *
                 * torso.Fight();
                 * torso.Flex();
                 */
            }
        }