Esempio n. 1
0
 public void Breed()
 {
     for (int cik = World.instance.rnd.Next(MAX_OFFSPRINGS) + 1; cik > 0; cik--)
     {
         Coords freeCoords = new Coords(this.coords);
         if (FindeEmptyCell(ref freeCoords))
         {
             Rabbit newBunny = new Rabbit(this.color, freeCoords, this.speed);
             World.instance.grid[newBunny.coords] = newBunny;
             World.instance.actors.Add(World.instance.grid[newBunny.coords]);
         }
     }
 }