Beispiel #1
0
 public override void mate(Animals detecter, Animals detectee)
 {
     if (detecter is Lion && detectee is Lion)
     {
         if (detecter.gender != detectee.gender)
         {
             for (int i = 0; i < 3;)
             {
                 int ranX2 = s.r.Next(0, 20);
                 int ranY2 = s.r2.Next(0, 20);
                 if (s.africa[ranX2, ranY2].ani != null)
                 {
                     s.africa[ranX2, ranY2].ani = new Lion(s, ranX2, ranY2);
                     i++;
                     s.godDraws();
                 }
             }
         }
     }
 }
Beispiel #2
0
 public abstract void mate(Animals detecter, Animals detectee);