Private Sub Button1_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles Button1.Click
Turtle.Left = Turtle.Left + 80
System.Threading.Thread.Sleep(1)
Application.DoEvents()
If RadioButton1.Checked = True Then
Do While Rabbit.Left < Me.ClientSize.Width
If Rabbit.Location.X = Tree.Location.X Then
End If
Rabbit.Left = Rabbit.Left + 1
System.Threading.Thread.Sleep(1)
Application.DoEvents()
If Turtle.Left = Me.ClientSize.Width Then
MsgBox("烏龜獲勝", , )
ElseIf Rabbit.Left = Me.ClientSize.Width Then
MsgBox("兔子獲勝", , )
End If
Loop
End If
End Sub
這是目前全部的程式碼~"~
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 114.38.17.21