Exemplo n.º 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.Randomizer.NextDouble() + 12, "speckled");
     }
     return(eggs);
 }
 public override Egg[] LayEggs(int numberOfEggs)
 {
     Egg[] eggs = new Egg[numberOfEggs];
     for (int i = 0; i < numberOfEggs; i++)
     {
         if (Bird.Randomizer.Next(4) == 0)
         {
             eggs[i] = new BrokenEgg("white");
         }
         else
         {
             eggs[i] = new Egg(Bird.Randomizer.NextDouble() * 2 + 1, "white");
         }
     }
     return(eggs);
 }