I am currently trying to program a hangman game as a final project - not a final grade or test. I have started this project but I am now stuck. The following is the code that has been started:
[
Dim secret() As String = {"fall", "spring", "winter", "summer", "thanksgiving"}
Dim input As Char
Dim guessWord As String
Dim randomNum As Integer
Dim wordLength As Integer
lstHidden.Items.Add(secret)
randomNum = Int(Rnd() * (secret.Length - 1))
guessWord = secret(randomNum)
wordLength = guessWord.Length
lblSecret.Text = " "
Do While wordLength > 0
lblSecret.Text = lblSecret.Text & "_ "
wordLength -= 1
Loop
input = InputBox("Enter a letter", "Letter Guess")
lstOutput.Items.Add(input)]
The problem is trying to get the users guess letter to search the secret letter and input in correct place. Can someone please help?
Thanks in advance