Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Dim rand As New Random
- Dim actual As String
- Dim word As String
- word = "enemy"
- actual = word
- Dim shuffledInput As String = word.OrderBy(Function() rand.Next).ToArray
- Label1.Text = shuffledInput
- If count = 7 Then
- MsgBox("Gameover.")
- count = 0
- ElseIf shuffledInput = word Then
- shuffledInput = word.OrderBy(Function() rand.Next).ToArray
- Label1.Text = shuffledInput
- Else
- If TextBox2.Text = word Then
- MsgBox("You guessed the word " & word & ".")
- count = 0
- ListBox1.Items.Clear()
- Else
- count += 1
- MsgBox("Count: " & count)
- ListBox1.Items.Add(TextBox2.Text)
- End If
- End If
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement