Wend
fenshu = fenshu + 100
End Sub
'此段代码为此程序的核心,即满行后消除(设计关键5)
设计思路:当下落的图形排满18个格子,则把这行的方块都隐藏,并把此行的二维数据都设为0(0表示如果有新方块下落,则可以通过),且通过二维数组fangkuai把此行上面的所有方块都下落1格。
(1)Private Sub tx1(X As Integer) '下述为7种图形的各种形状实现过程(设计关键1)
Select Case X
Case 1
cmd2(i).Move cmd1(i).Left + cmd1(i).Width, cmd1(i).Top
cmd3(i).Move cmd2(i).Left + cmd2(i).Width, cmd1(i).Top
cmd4(i).Move cmd3(i).Left + cmd3(i).Width, cmd1(i).Top
Case 2
cmd2(i).Move cmd1(i).Left, cmd1(i).Height + cmd1(i).Top
cmd3(i).Move cmd2(i).Left, cmd2(i).Height + cmd2(i).Top
cmd4(i).Move cmd3(i).Left, cmd3(i).Height + cmd3(i).Top
Case 3
cmd2(i).Move cmd1(i).Left + cmd1(i).Width, cmd1(i).Top
cmd3(i).Move cmd2(i).Left + cmd2(i).Width, cmd1(i).Top
cmd4(i).Move cmd3(i).Left + cmd3(i).Width, cmd1(i).Top
Case 4
cmd2(i).Move cmd1(i).Left, cmd1(i).Height + cmd1(i).Top
cmd3(i).Move cmd2(i).Left, cmd2(i).Height + cmd2(i).Top
cmd4(i).Move cmd3(i).Left, cmd3(i).Height + cmd3(i).Top
End Select
End Sub
(2)Private Sub tx2(X As Integer)
Select Case X
Case 1
cmd2(i).Move cmd1(i).Left + cmd1(i).Width, cmd1(i).Top
cmd3(i).Move cmd1(i).Left, cmd1(i).Top + cmd1(i).Height
cmd4(i).Move cmd3(i).Left + cmd3(i).Width, cmd3(i).Top
Case 2
cmd2(i).Move cmd1(i).Left + cmd1(i).Width, cmd1(i).Top
cmd3(i).Move cmd1(i).Left, cmd1(i).Top + cmd1(i).Height
cmd4(i).Move cmd3(i).Left + cmd3(i).Width, cmd3(i).Top
Case 3
cmd2(i).Move cmd1(i).Left + cmd1(i).Width, cmd1(i).Top
cmd3(i).Move cmd1(i).Left, cmd1(i).Top + cmd1(i).Height
cmd4(i).Move cmd3(i).Left + cmd3(i).Width, cmd3(i).Top
Case 4
|