Exemplo n.º 1
0
 private void newGame()
 {
     //yaboi = new Snek(segSize, (w / 2)-((w/2)%segSize), h / 2 - ((h/2)%segSize), initLen, 1);
     yaboi   = new Snek(segSize, (gw / 2), gh / 2, initLen, 1);
     food    = new List <bodySeg>();
     initLen = origInitLen;
     initPixs();
     initFood();
     t.Enabled = true;
 }
Exemplo n.º 2
0
 private void newGame()
 {
     //yaboi = new Snek(segSize, (w / 2)-((w/2)%segSize), h / 2 - ((h/2)%segSize), initLen, 1);
     if (yaboi != null)
     {
         n.fitness = yaboi.life;
     }
     yaboi   = new Snek(segSize, (gw / 2), gh / 2, initLen, 1);
     food    = new List <bodySeg>();
     initLen = origInitLen;
     initPixs();
     initFood();
     pop.Add(n);
     textBox2.Text = pop.Count().ToString();
     newNN(oldPops.Any());
     if (pop.Count > popSize)
     {
         oldPops.Add(pop);
         pop = new List <NN>();
         prepOldPop();
     }
     t.Enabled = true;
 }