예제 #1
0
        private void btnPlay_Click(object sender, EventArgs e)
        {
            frmPlayGuesstheWord guess = new frmPlayGuesstheWord(playerName);

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