Ejemplo n.º 1
0
 public GameScene(Watcher watcher = null)
 {
     Add(new Watcher(watcher));
     for (int i = 0; i < Global.SystemConfig.Predators; i++)
     {
         Add(new Predator(new Point(Rand.Int(Global.Width), Rand.Int(Global.Height))));
     }
     for (int i = 0; i < Global.SystemConfig.Herbivores; i++)
     {
         Add(new Herbivore(new Point(Rand.Int(Global.Width), Rand.Int(Global.Height))));
     }
 }
Ejemplo n.º 2
0
 public Watcher(Watcher watcher)
 {
     if (watcher != null)
     {
         CountOfResults.Add("Red", watcher.CountOfResults["Red"]);
         CountOfResults.Add("Green", watcher.CountOfResults["Green"]);
     }
     else
     {
         CountOfResults.Add("Red", 0);
         CountOfResults.Add("Green", 0);
     }
     EndInitiated = false;
     EndTimer = 0;
 }