Пример #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();
 }
Пример #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();
 }
Пример #3
0
 private void timerFood_Tick(object sender, EventArgs e)
 {
     timerFood.Interval = initFoodTimer - grid.score * 5;
     grid.GenerateFood();
     this.Invalidate();
 }