Beispiel #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;
 }
Beispiel #2
0
 public void toxic(Animal target)
 {
     this.moodUp();
     target.injured();
     target.moodDown();
 }
Beispiel #3
0
 public void attack(Animal target)
 {
     this.moodDown();
     target.injured();
 }
Beispiel #4
0
 public void addAnimal(Animal animal)
 {
     this.animals.Add(animal);
 }