Ejemplo n.º 1
0
 private void StartGame()
 {
     this.grid = new SnakeGrid(nRow, nCol, width, height, snakeSize);
     foodTimer = initFoodTimer;
     timerMain.Start();
     timerFood.Start();
     start = DateTime.Now;
     grid.GenerateFood();
 }
Ejemplo n.º 2
0
 private void StartGame()
 {
     this.grid = new SnakeGrid(nRow, nCol, width, height, snakeSize);
     foodTimer = initFoodTimer;
     timerMain.Start();
     timerFood.Start();
     start = DateTime.Now;
     grid.GenerateFood();
 }
Ejemplo n.º 3
0
 private void timerFood_Tick(object sender, EventArgs e)
 {
     timerFood.Interval = initFoodTimer - grid.score * 5;
     grid.GenerateFood();
     this.Invalidate();
 }