Codice PHP:
Dim generator As New Random
Dim randomValue As Integer
randomValue = generator.Next(1, 4)
If randomValue = (1) Then
TextBox1.Text = ("Sasso")
End If
If randomValue = (2) Then
TextBox1.Text = ("Carta")
End If
If randomValue = (3) Then
TextBox1.Text = ("Forbice")
End If
If TextBox1.Text = ("Sasso") And TextBox2.Text = ("Carta") Or TextBox1.Text = ("Carta") And TextBox2.Text = ("Forbice") Or TextBox1.Text = ("Forbice") And TextBox2.Text = ("Sasso") Then
MsgBox("Hai" & " " & "Vinto")
Else
MsgBox("Hai" & " " & "Perso")
End If
Questo è il codice, il gioco funziona, ma se escono due voci uguali dice che perdo, non riesco a mettere la patta, idee??