public void HerbivoreEatsPlant() { toDelete.Clear(); Position herbivorePosition = new Position(1, 1); Position plantPosition = new Position(2, 1); herbivore = new Herbivore(herbivorePosition, BeginTerrarium); testPlant = new Plant(); testPlant.Position = plantPosition; testPlant.Terrarium = BeginTerrarium; var health = herbivore.Health; herbivore.Eat(testPlant, toDelete); // health moet met één verhogen als plant wordt gegeten Assert.AreEqual(health + 1, herbivore.Health); Assert.IsTrue(toDelete.Contains(testPlant)); }
public void AnimalFood() { herbivore.Eat(); predator.Eat(herbivore); }
public void RunFoodChain() { carnivore.Eat(herbivore); herbivore.Eat("grass"); }