Cls
If Option1.Value = True Then user = 1
If Option2.Value = True Then user = 2
If Option2.Value = True Then user = 3
Randomize Timer
computer = Int(Rnd * 3 + 1)
If computer = 1 Then Label3.Caption = "剪刀"
If computer = 2 Then Label3.Caption = "石頭"
If computer = 3 Then Label3.Caption = "布"
a = user - computer
If a = 0 Then Print "平"
If a = -1 Or a = 2 Then Print "輸"
If a = 1 Or a = -2 Then Print "贏"
End Sub
Private Sub Form_Load()
Label1.Caption = "User"
Label2.Caption = "Computer"
Option1.Caption = "剪刀"
Option2.Caption = "石頭"
Option3.Caption = "布"
End Sub