public void AddMWolf(int x, int y) { IAnimal animal = new MWolf(cells[x, y], _random); Animals.Add(animal); animal.Death += Animal_Die; }
public void Renovate(int rabitsCount, int FWolfsCount, int MWolfsCount) { Cell tmp; IAnimal animal; _rabitsCount = rabitsCount; _MWolfsCount = MWolfsCount; _FWolfsCount = FWolfsCount; for (int i = 0; i < rabitsCount; i++) { tmp = RandomEmptyCell(); if (tmp != null) { animal = new Rabit(tmp, _random); Animals.Add(animal); animal.Death += Animal_Die; } } for (int i = 0; i < FWolfsCount; i++) { tmp = RandomEmptyCell(); if (tmp != null) { animal = new FWolf(tmp, _random); Animals.Add(animal); animal.Death += Animal_Die; } } for (int i = 0; i < MWolfsCount; i++) { tmp = RandomEmptyCell(); if (tmp != null) { animal = new MWolf(tmp, _random); Animals.Add(animal); animal.Death += Animal_Die; } } }