Пример #1
0
        public static Hero MakeWarrior(this HeroBuilder builder, string name)
        {
            var hero = builder
                       .SetName(name)
                       .SetArmor("Chain mail")
                       .SetWeapon("Sword")
                       .Build();

            return(hero);
        }
Пример #2
0
        public static Hero MakeArcher(this HeroBuilder builder, string name)
        {
            var hero = builder
                       .SetName(name)
                       .SetArmor("Leather")
                       .SetWeapon("Bow")
                       .Build();

            return(hero);
        }
Пример #3
0
        public static Hero MakeAssassin(this HeroBuilder builder, string name)
        {
            var hero = builder
                       .SetName(name)
                       .SetArmor("Plate")
                       .SetWeapon("Blades")
                       .Build();

            return(hero);
        }