private void btnPlay_Click(object sender, EventArgs e) { frmPlayGuesstheWord guess = new frmPlayGuesstheWord(playerName); guess.Show(); this.Hide(); }
private void btnEnter_Click(object sender, EventArgs e) { guess = txtGuess.Text; setNewWord(); if (numGuess == 0) { MessageBox.Show("You have run out of guesses", "Game Over"); var playerChoice = MessageBox.Show("Congratulations " + playerName + " you scored " + score + "\nWould you like to play again?", "Game Over", MessageBoxButtons.YesNo); if (playerChoice == DialogResult.Yes) { frmPlayGuesstheWord gw = new frmPlayGuesstheWord(playerName); gw.Show(); this.Hide(); } else { frmGameChoice gameC = new frmGameChoice(playerName); gameC.Show(); this.Hide(); } } }