コード例 #1
0
ファイル: Program.cs プロジェクト: silvestreluna/Legos
        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();

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

            //fatHead.Size = HeadSize.Small;
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: CalvinDaMogul/legos-
        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();
        }
    }
コード例 #3
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();
        }
コード例 #4
0
ファイル: Program.cs プロジェクト: HeathJHMoore/firstCSharp
        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);
        }