Im using a random number generated to move two pictures. I have two random number generating. on for picturebox1 and picturebox2 basically. Here is the problem. The random numbers just go straight into the scoring system. So instead of going up by 1 when a is higher than b it shows the number generated. I'm out putting all this in a messgebox which pops up through the click of a button
This is for the random numbers and the incrementing the higher one up by 1 and if they are the same adding 1 to c.
a is picturebox1
b is picturebox2
c is a tie
CODE
Dim a As Integer = 0
Dim b As Integer = 0
Dim c As Integer = 0
Dim RandomClass As New Random()
Dim RandomClassb As New Random()
Dim RandomNumber As Integer
Dim random1 As Integer
a = RandomNumber
RandomNumber = RandomClass.Next(1, 14)
b = random1
random1 = RandomClassb.Next(1, 14)
If a >= b Then
c += 1
ElseIf a > b Then
a += 1
ElseIf b > a Then
b += 1
ElseIf b >= a Then
c += 1
End If
MessageBox.Show("Race Results" & vbCrLf & vbCrLf & "Rocket 1: " & a & vbCrLf & vbCrLf & "Rocket 2: " & b & vbCrLf & vbCrLf & "Tie: " & c, _
"Race Results", MessageBoxButtons.OK, MessageBoxIcon.Information)
Thanks for the help.