internal static IZombie CreateZombie(string type) { switch (type) { case "Regular": return(new RegularZombie(50)); default: return(ZombieWithAccessoryFactory.CreateZombie(type)); } }
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)); } }