Пример #1
0
 public override Egg[] LayEggs(int numberOfEggs)
 {
     Egg[] eggs = new Egg[numberOfEggs];
     for (int i = 0; i < numberOfEggs; i++)
     {
         eggs[i] = new Egg(Bird.random.NextDouble() + 12, "speckled");
     }
     return(eggs);
 }
Пример #2
0
 public override Egg[] LayEggs(int numberOfEggs)
 {
     Egg[] eggs = new Egg[numberOfEggs];
     for (int i = 0; i < numberOfEggs; i++)
     {
         if (Bird.random.Next(4) == 0)
         {
             eggs[i] = new BrokenEgg("white");
         }
         else
         {
             eggs[i] = new Egg(Bird.random.NextDouble() * 2 + 1, "white");
         }
     }
     return(eggs);
 }