Пример #1
0
        internal static IZombie CreateZombie(string type)
        {
            switch (type)
            {
            case "Regular":
                return(new RegularZombie(50));

            default:
                return(ZombieWithAccessoryFactory.CreateZombie(type));
            }
        }
Пример #2
0
        internal static ZombieClass CreateZombie(string type, IDeathObserver observer)
        {
            switch (type)
            {
            case "Regular":
                RegularZombie zombie = new RegularZombie(50);
                zombie.Attach(observer);
                return(zombie);

            default:
                return(ZombieWithAccessoryFactory.CreateZombie(type, observer));
            }
        }