On Error GoTo Over: If x(a) + 1 > 20 Or x(a) + 1 < 1 Then GoTo Over: Next a If 1 = 2 ThenOver: Call ClsBox 'Timelen = 500 Call ShapeAdd 'MsgBox "GameOver!": End End If If 1 = 2 Thendone: For a = 1 To 4 If BF(x(a) + 1, y(a) + 1) = 1 Then GoTo Over: Next a For a = 1 To 4 BF(x(a) + 1, y(a) + 1) = 1 Next a Call ShapeAdd: If BottomAsk = True Then TimeLen = 500: BottomAsk = False End IfPass:End Sub
Private Sub Turn() Dim ret As Integer For a = 1 To 4 ret = x(a) - x(3): mY(a) = ret + y(3) ret = y(a) - y(3): mX(a) = ret + x(3) doit: ' On Error GoTo chc:' If 1 = 2 Then' If syssin Then'chc:' On Error Resume Next' Else' On Error GoTo handle:' End If' End If' Next a''If 1 = 2 Then'handle:' If BF(mX(a) + 2, mY(a) + 2) = 1 Then GoTo Pass:'End If ComeTure'Pass: 'Totoo作品,中国智造End Sub
Sub XFull() 'Totoo作品,中国智造 Dim Ia As Integer, I As Integer Dim mY As Integer, BfRet(1 To 10, 1 To 20) As Integer Dim Cleanit As Boolean For b = 1 To 20 For a = 1 To 10 If BF(a, b) = 1 Then Ia = Ia + 1 Next a If Ia = 10 Then I = I + 1: Toper(I) = b: '记录满格 Ia = 0 Next b If I <> 0 Then For b = 1 To I For a = 1 To 10 BF(a, Toper(b)) = 0 Next asocre = socre + 200 Next bLabel2.Caption = "得分:" & Str(socre) End If If (Clean = True) Then For a = 1 To 10 Cleanit = False For b = 1 To 20 mY = 0 mY = BF(a, b) If BF(a, b) = 1 Then For c = 1 To I If Toper(c) <> 0 Then If b < Toper(c) Then mY = mY + 1 Cleanit = True End If End If If c = I Then If b + mY > 20 Then GoTo Pass: BfRet(a, b + mY - 1) = 1 If 1 = 2 ThenPass: For d = 1 To 10 BfRet(a, 20) = 1 Next d End If End If Next c End If mY = 0 Next b If Cleanit = True Then For b = 1 To 20 BF(a, b) = BfRet(a, b) BfRet(a, b) = 0 Next b End IfNext aEnd If For L = 1 To I Toper(L) = 0 Next LEnd Sub
Private Sub Save() Dim SFN As String CommonDialog1.ShowOpen SFN = CommonDialog1.FileName If SFN <> "" Then Open SFN & ".totooDat" For Output As #1 For a = 1 To 10 For b = 1 To 20 Print #1, BF(a, b) Next b, a Print socre Close #1 End IfEnd Sub
Private Sub Combo1_KeyDown(KeyCode As Integer, Shift As Integer) Select Case KeyCode Case 65, 37: MoveLeft Case 68, 39: MoveRight Case 87, 38: Turn Case 83, 40: TimeLen = 20: BottomAsk = True End Select If KeyCode = 13 Then EntI = EntI + 1 If EntI Mod 2 = 1 Then TimeLen = 10 Else: TimeLen = 1000: End If End IfEnd Sub
Private Sub Fail() Clean = True For a = 1 To 4 y(a) = y(a) + 1Shape2(a - 1).Move x(a) * Boxl, y(a) * Boxl Next aEnd Sub