trying to not allow doubles if there is a double For example, if the app returns two random numbers that are the same (5 & 5), the app will recognize this and adjust one of the numbers so that it is no longer equal to the other number. The results of rolling the dice must be the results from a random number generator, unless the results yield numbers that are identical; in that case, one of the numbers will need to be adjusted. The user must never know that the results have been changed
blic Class Form1
Private Sub btnRolldice_Click(sender As Object, e As EventArgs) Handles btnRolldice.Click
Dim ranGem As New Random
Dim dblnum1 As Double
Dim dblnum2 As Double
Dim dbltotal As Double
dblnum1 = ranGem.Next(1, 7)
dblnum2 = ranGem.Next(1, 7)
Select Case dblnum1
Case 1
picDie1.Image = picDice1.Image
Case 2
picDie1.Image = picDice2.Image
Case 3
picDie1.Image = picDice3.Image
Case 4
picDie1.Image = picDice4.Image
Case 5
picDie1.Image = picDice5.Image
Case 6
picDie1.Image = picDice6.Image
End Select
Select Case dblnum2
Case 1
picDie2.Image = picDice1.Image
Case 2
picDie2.Image = picDice2.Image
Case 3
picDie2.Image = picDice3.Image
Case 4
picDie2.Image = picDice4.Image
Case 5
picDie2.Image = picDice5.Image
Case 6
picDie2.Image = picDice6.Image
End Select
dbltotal = dblnum1 + dblnum2
lblTotal.Text = dbltotal.ToString
End Sub
Private Sub btnExit_Click(sender As Object, e As EventArgs) Handles btnExit.Click
Me.Close()
End Sub
End Class