public override void Visit(Lion lion) { if (lion.Gender == Gender) { return; } for (int i = 0; i < 2; i++) { var gender = (Gender) Random.Next(0, 2); var cub = new Lion(this.spawner, gender); this.spawner.Spawn(cub); } base.Visit(lion); }
public override void Visit(Lion lion) { if (lion.Gender == Gender) { return; } for (int i = 0; i < 2; i++) { var gender = (Gender)Random.Next(0, 2); var cub = new Lion(this.spawner, gender); this.spawner.Spawn(cub); } base.Visit(lion); }