Private Sub panduan(h As Integer)
Dim X, g As Integer
For X = 1 To 10
If num(X, h) > 0 Then '判断是否应该消行
g = g + 1
End If
Next X
If g = 10 Then
Call xiaohang(h)
g = 0
End If
End Sub
Private Sub xiaohang(X As Integer) 'x为所要消除的1-18的任意一行行号
Dim a, b As Integer
For a = 1 To 10
fangkuai(a, X).Visible = False
Next a
b = X - 1
While b > 0
a = 10
While a > 0
If num(a, b) > 0 Then
num(a, b + 1) = num(a, b)
fangkuai(a, b).Move fangkuai(a, b).Left, fangkuai(a, b).Height + fangkuai(a, b).Top
Set fangkuai(a, b + 1) = fangkuai(a, b)
fangkuai(a, b + 1).Visible = True
Else
num(a, b + 1) = 0
End If
num(a, b) = 0
a = a - 1
Wend
b = b - 1
|