sp; End If
End If
End If
End Sub
''该自定义子过程用于游戏数据初始化
Private Sub subGameInitialize()
intWellsIndex(1, 1) = 1
intWellsIndex(1, 2) = 2
intWellsIndex(1, 3) = 3
intWellsIndex(2, 1) = 4
intWellsIndex(2, 2) = 5
intWellsIndex(2, 3) = 6
intWellsIndex(3, 1) = 7
intWellsIndex(3, 2) = 8
intWellsIndex(3, 3) = 9
For i = 1 To 7 Step 3
usrWells(i).Wells_X = 0
Next i
For i = 2 To 8 Step 3
usrWells(i).Wells_X = Me.picWells.Width * (1 / 3)
Next i
For i = 3 To 9 Step 3
usrWells(i).Wells_X = Me.picWells.Width * (2 / 3)
Next i
For i = 1 To 3 Step 1
usrWells(i).Wells_Y = 0
Next i
For i = 4 To 6 Step 1
usrWells(i).Wells_Y = Me.picWells.Height * (1 / 3)
Next i
For i = 7 To 9 Step 1
usrWells(i).Wells_Y = Me.picWells.Height * (2 / 3)
Next i
For i = 1 To 9
usrWells(i).Wells_Value = 0
Next i
End Sub
''该自定义子过程用于游戏开始时刷新屏幕
Private Sub subScreenRefresh()
Me.lblPlayerTurns.Caption = lngPlayerTurn
Me.lblPlayerScore.Caption = lngPlayerScore
Me.picWells.Line (0, Me.picWells.Height * (1 / 3))-(Me.picWells.Width, Me.picWells.Height * (1 / 3)),
vbBlack
Me.picWells.Line (0, Me.picWells.Height * (2 / 3))-(Me.picWells.Width, Me.picWells.Height * (2 / 3)), vbBlack
Me.picWells.Line (Me.picWells.Width * (1 / 3), 0)-(Me.picWells.Width * (1 / 3), Me.picWells.Height), vbBlack
Me.picWells.Line (Me.picWells.Width * (2 / 3), 0)-(Me.picWells.Width * (2 / 3), Me.picWells.Height), vbBlack
End Sub
''该自定义子过程用于执行机器的下子
Private Sub subComputerDoing()
Randomize
Dim lngGetWells_X As Long, lngGetWells_Y As Long
Dim intPCFirstWells As Integer
Dim blnPCWellsExists As Boolean
Dim intPCWells As Integer
For i = 1 To 9 Step 1
If usrWells(i).Wells_Value = -1 Then
blnPCWellsExists