Option Explicit
Dim blackturn As Boolean '轮到黑方下子
Dim whiteturn As Boolean '轮到黑方下子
Dim qipan(0 To 15, 0 To 15) As Integer '用此二维数组表示棋盘
Dim inti As Integer '数组元素
Dim intj As Integer
Dim boolF As Boolean '表示棋局状态:进行/结束
Private Sub begin_Click() '重新开始
Me.Cls '清除窗口
For inti = 0 To 15
For intj = 0 To 15
qipan(inti, intj) = 0 '数组清零
Next
Next
Form_Load '重画棋盘
End Sub
Private Sub exit_Click() '退出
Unload Me
Set Form1 = Nothing
End Sub
Private Sub Form_Load()
Form_Paint '画棋盘
blackturn = True '黑方先下
boolF = True '开始
Label1.Caption = "黑方先下"
End Sub
'下子
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
本内容试读结束,登录后可阅读更多
下载后可阅读完整内容,剩余4页未读,立即下载
- 1
- 2
前往页