子程序或函数未定义,怎么回事呢????
PrivateSubimine_mouseup(IndexAsInteger,ButtonAsInteger,ShiftAsInteger,xAsSingle,yAsSi...
Private Sub imine_mouseup(Index As Integer, Button As Integer, Shift As Integer, x As Single, y As Single)
Dim xxx As Integer
Dim yyy As Integer
Dim rx As Integer
Dim ry As Integer
Dim cmine_num As Integer
If isdie = False And isfinal = False Then
xxx = Index Mod map_x
yyy = Index \ map_x
If Button = 1 And mapfacearr(xxx, yyy) = 1 Then
If isstart = False Then
cmine_num = minenum
isstart = True
Timer1.Enabled = True
Do While cmine_num > 0
rx = Rnd() * (map_x - 1)
ry = Rnd() * (map_y - 1)
If maparr(rx, ry) <> 9 And Not (rx = xxx And ry = yyy) Then
cmine_num = cmine_num - 1
maparr(rx, ry) = 9
For xx = rx - 1 To rx + 1
For yy = ry - 1 To ry + 1
If xx >= 0 And xx <= map_x And yy >= 0 And yy <= map_y Then
If maparr(xx, yy) <> 9 And Not (xx = rx And yy = ry) Then
maparr(xx, yy) = maparr(xx, yy) + 1
End If
End If
Next yy
Next xx
End If
Loop
End If
mapfacearr(xxx, yyy) = 0
Select Case maparr(xxx, yyy)
Case 0
Call doclear(xxx, yyy, Index)
Call setmineimage(Index, 10)
Case 1 To 8
mine_num_clear = mine_num_clear + 1
Call setmineimage(Index, maparr(xxx, yyy))
Case 9
isdie = True
Timer1.Enabled = False
Call showmine
Call setmineimage(Index, 12)
End Select
If map_x * map_y - mine_num_clear = mine_num Then
isfinal = True
End If
End If
Call stateimage
End If
End Sub
扫雷的游戏状态函数……isdie是布朗型函数true则游戏结束 展开
Dim xxx As Integer
Dim yyy As Integer
Dim rx As Integer
Dim ry As Integer
Dim cmine_num As Integer
If isdie = False And isfinal = False Then
xxx = Index Mod map_x
yyy = Index \ map_x
If Button = 1 And mapfacearr(xxx, yyy) = 1 Then
If isstart = False Then
cmine_num = minenum
isstart = True
Timer1.Enabled = True
Do While cmine_num > 0
rx = Rnd() * (map_x - 1)
ry = Rnd() * (map_y - 1)
If maparr(rx, ry) <> 9 And Not (rx = xxx And ry = yyy) Then
cmine_num = cmine_num - 1
maparr(rx, ry) = 9
For xx = rx - 1 To rx + 1
For yy = ry - 1 To ry + 1
If xx >= 0 And xx <= map_x And yy >= 0 And yy <= map_y Then
If maparr(xx, yy) <> 9 And Not (xx = rx And yy = ry) Then
maparr(xx, yy) = maparr(xx, yy) + 1
End If
End If
Next yy
Next xx
End If
Loop
End If
mapfacearr(xxx, yyy) = 0
Select Case maparr(xxx, yyy)
Case 0
Call doclear(xxx, yyy, Index)
Call setmineimage(Index, 10)
Case 1 To 8
mine_num_clear = mine_num_clear + 1
Call setmineimage(Index, maparr(xxx, yyy))
Case 9
isdie = True
Timer1.Enabled = False
Call showmine
Call setmineimage(Index, 12)
End Select
If map_x * map_y - mine_num_clear = mine_num Then
isfinal = True
End If
End If
Call stateimage
End If
End Sub
扫雷的游戏状态函数……isdie是布朗型函数true则游戏结束 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询