Example #1
0
 void gameOver()
 {
     timer1.Stop();
     //Show "Game over" and "Press any key to begin"
     label7.Show();
     label13.Show();
     trackBar2.Enabled = true;
     checkBox1.Enabled = true;
     trackBar4.Enabled = true;
     //remove apple
     apple.picBox.Dispose();
     //remove all snake and obstacles
     snake.clear();
     obs.clear();
     gameHandler = false;    //game is off
     //hide the grid
     pictureBox1.Hide();
     this.Update();
 }