Exemple #1
0
 private void timer1_Tick(object sender, EventArgs e)
 {
     if (aiMode)
     {
         currentSnake.dir = Player.ChooseDir(currentSnake, currendFood);
     }
     else
     {
         Player.lastdir = currentSnake.dir;
     }
     if (alive)
     {
         currentSnake.Shift();
         draw(null);
         checkFood();
         checkDeath();
         if (currentSnake.level > best)
         {
             best = currentSnake.level;
         }
     }
 }