Esempio n. 1
0
        private void btnPlay_Click(object sender, EventArgs e)
        {
            frmPlayGuesstheWord guess = new frmPlayGuesstheWord(playerName);

            guess.Show();
            this.Hide();
        }
Esempio n. 2
0
        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();
                }
            }
        }
        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();
                }
            }
        }
Esempio n. 4
0
 private void btnPlay_Click(object sender, EventArgs e)
 {
     frmPlayGuesstheWord guess = new frmPlayGuesstheWord(playerName);
     guess.Show();
     this.Hide();
 }