還有各地方不懂
Command1是為控制陣列index=(0~8)
If Command1(1).Tag = "X" And Command1(4).Tag = "O" Then
If Command1(0).Tag = "" And Command1(2).Tag = "" And Command1(3).Tag = "" And Command1(5).Tag = "" And Command1(6).Tag = "" And Command1(7).Tag = "" And Command1(8).Tag = "" Then
      N = Int(Rnd * 4)
      If N = 3 Then N = 3
      If N = 2 Then N = 5
      If N = 1 Then N = 6
      If N = 0 Then N = 8
      Command1(N).Tag = "X"
      Command1(N).Caption = "X"
      Command1(N).Enabled = False
      GoTo ComWin
      End If
    End If

就是中間這N的地方不懂
N = Int(Rnd * 4)
If N = 3 Then N = 3
If N = 2 Then N = 5
If N = 1 Then N = 6
If N = 0 Then N = 8
arrow
arrow
    全站熱搜

    vbqa 發表在 痞客邦 留言(1) 人氣()