public void restart() { //restarts game timer1.Enabled = false; MessageBox.Show("Snake is dead. You scored: " + Globals.CurrentScore.ToString(), this.Text); if (Globals.CurrentScore >= 100) { //if the current score is higher than 100 //then display option to submit score to scoreboard if (MessageBox.Show("Would you like to submit your highscores?", this.Text, MessageBoxButtons.YesNo) == DialogResult.Yes) { frmHighscores h = new frmHighscores(); h.Show(); lblSnakeScore.Text = "0"; spaceBarLabel.Text = "Press 'Enter' to Begin"; snake = new Snake(); } else { resetScore(); } } else { resetScore(); } }
private void highscoresToolStripMenuItem_Click(object sender, EventArgs e) { frmHighscores h = new frmHighscores(); h.Show(); }