My name is Stephanie and I have no idea what I am doing. Here is what I need help with:
Modify the code in the btnGuessW_Click event procedure. Add the code to implement the following logic after the existing code:
• Test the value in strWordGuessed against the value in strWordToGuess.
• If incorrect (different values), increment intNumWrongTries.
When the number of incorrect answers is less than six, display the following string in a MessageBox control:
" That is not correct. You have guessed wrong y times."
Replace y with the number of wrong guesses. Use the following syntax for the MessageBox control:
MessageBox.Show("Text to display")
When the number of wrong tries equals six, display the message "You lose." and display strWordtoGuess in lblWord. Use the following syntax for the MessageBox control:
MessageBox.Show("Text to display")
• If correct, display strWordtoGuess in lblWord, and display the following message:
"You guessed the word in x tries."
Replace x with the number of guesses.
The code I have so far:
Private Sub btnGuessW_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnGuessW.Click
Dim strWordGuessed = "BASSETT HOUND"
intNumTries += 1
strWordGuessed = txtWord.Text.ToUpper
strWordGuessed(0) = strWordToGuess "B"
strWordGuessed(1) = strWordToGuess "A"
strWordGuessed(2) = strWordToGuess "S"
strWordGuessed(3) = strWordToGuess "S"
strWordGuessed(4) = strWordToGuess "E"
strWordGuessed(5) = strWordToGuess "T"
strWordGuessed(6) = strWordToGuess "T"
strWordGuessed(7) = strWordToGuess "H"
strWordGuessed(8) = strWordToGuess "O"
strWordGuessed(9) = strWordToGuess "U"
strWordGuessed(10) = strWordToGuess "N"
strWordGuessed(11) = strWordToGuess "D"