Exemplo n.º 1
0
 /// <summary>
 /// This method removes the animal specified as a parameter from the ArrayList.
 /// </summary>
 public void removeAnimal(Animal a)
 {
     animals.Remove(a);
 }
Exemplo n.º 2
0
 /// <summary>
 /// This method allows an animal to breed with another animal, to form offspring.
 /// Needs much more indepth checking, we don't want penguins breeding with horses, etc..
 /// </summary>
 public Animal breed(Animal a)
 {
     // TODO: implement breeding checker
     Animal offpsring = new Animal();
     return offpsring;
 }
Exemplo n.º 3
0
 /// <summary>
 /// This method creates an animal passing through the given parameters.
 /// </summary>
 public void addAnimal(Animal a)
 {
     animals.Add(a);
 }