打印本文 打印本文 关闭窗口 关闭窗口
俄罗斯方块的VB实现,部分代码!
作者:武汉SEO闵涛  文章来源:敏韬网  点击数10371  更新时间:2009/4/23 15:43:16  文章录入:mintao  责任编辑:mintao
sp;   Else
                Form_main.Timer_speed = True
            End If
        Case 15
            If Form_main.Image_block(by * 10 + 3).Visible = True Or Form_main.Image_block(by * 10 + 4).Visible = True Or Form_main.Image_block(by * 10 + 13).Visible = True Or Form_main.Image_block(by * 10 + 14).Visible = True Then
                Form_main.Timer_speed.Enabled = False
                Form_main.timer_now.Enabled = False
                MsgBox "游戏结束!^_^"
                            Else
                Form_main.Timer_speed = True
            End If
        Case 16
            If Form_main.Image_block(by * 10 + 3).Visible = True Or Form_main.Image_block(by * 10 + 4).Visible = True Or Form_main.Image_block(by * 10 + 13).Visible = True Or Form_main.Image_block(by * 10 + 14).Visible = True Then
                Form_main.Timer_speed.Enabled = False
                Form_main.timer_now.Enabled = False
                MsgBox "游戏结束!^_^"
                            Else
                Form_main.Timer_speed = True
            End If
        Case 17
            If Form_main.Image_block(by * 10 + 3).Visible = True Or Form_main.Image_block(by * 10 + 4).Visible = True Or Form_main.Image_block(by * 10 + 13).Visible = True Or Form_main.Image_block(by * 10 + 14).Visible = True Then
                Form_main.Timer_speed.Enabled = False
                Form_main.timer_now.Enabled = False
                MsgBox "游戏结束!^_^"
                            Else
                Form_main.Timer_speed = True
            End If
        Case 18
            If Form_main.Image_block(by * 10 + 3).Visible = True Or Form_main.Image_block(by * 10 + 4).Visible = True Or Form_main.Image_block(by * 10 + 13).Visible = True Or Form_main.Image_block(by * 10 + 14).Visible = True Then
                Form_main.Timer_speed.Enabled = False
                Form_main.timer_now.Enabled = False
                MsgBox "游戏结束!^_^"
                            Else
                Form_main.Timer_speed = True
            End If
        Case 19
            If Form_main.Image_block(by * 10 + 3).Visible = True Or Form_main.Image_block(by * 10 + 4).Visible = True Or Form_main.Image_block(by * 10 + 13).Visible = True Or Form_main.Image_block(by * 10 + 14).Visible = True Then
                Form_main.Timer_speed.Enabled = False
                Form_main.timer_now.Enabled = False
                MsgBox "游戏结束!^_^"
                            Else
                Form_main.Timer_speed = True
            End If
    End Select
End Sub
Sub fall_buttom(block_l As Integer)  ''''是否达到底部
    Select Case block_l
        Case 1 ''''正方形
            If by = 15 Then
                Call clear(block_l, by)
                bx = 3
                by = 0
                Form_main.Timer_speed.Enabled = False
                Call next_block
            ElseIf Form_main.Image_block(by * 10 + bx + 20).Visible = True Or Form_main.Image_block(by * 10 + bx + 21).Visible Then
                Call clear(block_l, by)
                bx = 3
                by = 0
                Form_main.Timer_speed.Enabled = False
                Call next_block
            Else
            End If
        Case 2 ''''Z字形
            If by = 15 Then
                Call clear(block_l, by)
                bx = 3
                by = 0
                Form_main.Timer_speed.Enabled = False
                Call next_block
            ElseIf Form_main.Image_block(by * 10 + bx + 10).Visible = True Or Form_main.Image_block(by * 10 + bx + 21).Visible = True Or Form_main.Image_block(by * 10 + bx + 22).Visible = True Then
                Call clear(block_l, by)
                bx = 3
                by = 0
                Form_main.Timer_speed.Enabled = False
                Call next_block
            Else
            End If
        Case 3 ''''反Z字型
     

上一页  [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]  ...  下一页 >> 

打印本文 打印本文 关闭窗口 关闭窗口