Пример #1
0
        static void Main(string[] args)
        {
            var taffy = new Candy("Orange", "Orange Saltwater Taffy", CandyType.Stretchy);

            taffy.SetRating(10);
            taffy.SetRating(5, "Just kinda liked it.");

            Console.WriteLine(taffy.ToString());

            var myDogHead = new Dog();

            myDogHead.Talk();

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

            var fitTorso = new FitTorso(2);

            fitTorso.Crunch(12);

            var minifigure = new Minifigure(astronaught, fitTorso);

            minifigure.Greet();


            Console.ReadLine();
        }
Пример #2
0
        public void Kick(Minifigure personToKick)
        {
            GetType();

            Console.WriteLine($"{personToKick.Name} just got kicked by {GetType().Name}." +
                              $"Ha Ha Ha. You're not even a scientist.");
        }
Пример #3
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();
        }
Пример #4
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();
            }
        }
Пример #5
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();
        }
Пример #6
0
        static void Main(string[] args)
        {
            var minifigure = new Minifigure();
            minifigure.Head = new YodaHead
            {
                EyeColor = "Blue",
                HairColor = "Black",

            var fatHead = new FatHead();

            fatHead.Talk();
            minifigure.Head.Think();
        }
    }
Пример #7
0
        static void Main(string[] args)
        {
            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.Think();
        }
Пример #8
0
        static void Main(string[] args)
        {
            //Console.WriteLine("Welcome To Lego Land.");

            var myDogHead  = new Dog();
            var martinHead = new Bald();
            var astronaut  = new Astronaut();

            var fitTorso = new FitTorso(2, Sex.Male, Colors.Freckles);

            fitTorso.Crunch(12);

            var adamsLegs = new OrangeLegs(Length.Short);

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

            minifigure.Greet();


            Console.ReadLine();
        }
Пример #9
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);
        }
Пример #10
0
 public virtual void Kick(Minifigure minifigure)
 {
     Console.WriteLine($"The legs kicked {minifigure.Name}, the {minifigure.Description}.");
 }
Пример #11
0
 public override void Kick(Minifigure minifigure)
 {
     Console.WriteLine($"Baby legs kicked {minifigure.Name}, the {minifigure.Description}.");
 }
Пример #12
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();
                 */
            }
        }