Example #1
0
 public bool Equals(Animal that)
 {
     if ((object)that == null)
     {
         return false;
     }
     if (that.petName.Equals(this.petName) && that.type == this.type && that.mood == this.mood && that.vitality == this.vitality)
     {
         return true;
     }
     return false;
 }
Example #2
0
 public void toxic(Animal target)
 {
     this.moodUp();
     target.injured();
     target.moodDown();
 }
Example #3
0
 public void attack(Animal target)
 {
     this.moodDown();
     target.injured();
 }
Example #4
0
 public void addAnimal(Animal animal)
 {
     this.animals.Add(animal);
 }