I'm suppose to create a Slot Machine game. The user starts with 100 tokens. With each "pull", the user loses 1 token and the computer "spins" three wheels, each consisting of the numbers 1, 2, 3.If all are 1, the user gets 4 tokens; If all are 2, the user gets 8 token; IF all are 3, the user gets 12 tokens. The number of tokens that the user has should display on the form and the result of the spin should be display in a message box. This is my code so far:
Dim number As Integer
Dim number1 As Integer
Dim number2 As Integer
Dim number3 As Integer
Randomize()
number = number - 1
Me.lblNum1.Text = Int(3 * Rnd() + 1)
Me.lblNum2.Text = Int(3 * Rnd() + 1)
Me.lblNum3.Text = Int(3 * Rnd() + 1)
If number1 = 1 And number2 = 1 And number3 = 1 Then
MessageBox.Show(" You get 4 tokens.")
number = number + 4
ElseIf number1 = 2 And number2 = 2 And number3 = 2 Then
MessageBox.Show("You get 8 tokens.")
number = number + 8
ElseIf number1 = 3 And number2 = 3 And number3 = 3 Then
MessageBox.Show("You het 12 tokens.")
number = number + 12
Else
MessageBox.Show("You Lost")
End If
Me.lblAnswer.Text = number
I don't know how to keep the count of the number of tokens, and have the messages display when a set of numbers are the same. Can you tell me what I'm missing or what I need to include? I just need HELP!!! (lol)