Excel版俄罗斯方块

原创 2004年02月29日 13:29:00

废话少说。现在我把一年多前的在Excel环境下用vba实现的俄罗斯方块的代码提供给大家,算是对拓展office应用的一个总结。由于程序是在去年写的,现在看来思路都有点不记得了,而且语句都不太高效。但我又懒得修改了,毕竟这个是可以正确运行的。大家参考我另外两篇相关的文章,试着做吧。

还是新建一个宏,键入下面代码。

Public Declare Function SetTimer Lib "user32" (ByVal hwnd As Long, ByVal nIDEvent As Long, ByVal uElapse As Long, ByVal lpTimerFunc As Long) As Long
Public Declare Function KillTimer Lib "user32" (ByVal hwnd As Long, ByVal nIDEvent As Long) As Long   '首先是API函数调用的声明。

 

Type pos_
    row As Long
    col As Long
End Type

Type obj
    pos As pos_
    stat As Long
    typ As Long
    color As Long
End Type  '基本对象数据结构的定义

Public cur_obj As obj
Public prv_obj As obj
Public nex_obj As obj
Public objs_array(27, 3) As pos_

Dim startpos As pos_
Dim nextpos As pos_

Global score As Long '分数
Public score_level As Long
Dim level As Long

Public gaming As Boolean
Public pulse As Boolean

Public interval As Long   '定时器时间间隙
Public timerset As Long   '定时器

Public top As Long   '记录方块堆积的最高层所在行

Public Const mosttop As Long = 5   '游戏区域的顶,当方块堆积到这里游戏结束
Public Const left As Long = 5   '游戏区域左边界
Public Const right As Long = 22   '游戏区域左边界
Public Const middle As Long = (left + right) / 2   '游戏区域中线,用以定位
Public Const bottom As Long = 25   '游戏区域底

Sub main()
    gaming = False

    If Worksheets.Count < 2 Then
        ActiveWorkbook.Sheets.Add after:=Worksheets(Worksheets.Count)
    Else
        Worksheets(Worksheets.Count).Select
    End If
    Load UserForm1
    UserForm1.Show
    End Sub

Function game_initial()
    '游戏初始化函数
    startpos.row = mosttop
    startpos.col = middle
    nextpos.row = mosttop
    nextpos.col = right + 8
    top = bottom - 1
    score = 0
    Range(Cells(mosttop + 1, left), Cells(bottom - 1, left)).Interior.ColorIndex = 1
    Range(Cells(mosttop + 1, right), Cells(bottom - 1, right)).Interior.ColorIndex = 1
    Range(Cells(bottom, left), Cells(bottom, right)).Interior.ColorIndex = 1
    Range(Cells(bottom, left), Cells(bottom, right)) = " "
   
    If Not gaming Then
   
    Cells.ColumnWidth = 1
    Cells.RowHeight = 10
       '初始化各形状的方块,我都忘了哪个对应哪种类型了
    objs_array(0, 0).row = -1
    objs_array(0, 0).col = -1
    objs_array(0, 1).row = 0
    objs_array(0, 1).col = -1
    objs_array(0, 2).row = 0
    objs_array(0, 2).col = 0
    objs_array(0, 3).row = 1
    objs_array(0, 3).col = 0
   
    objs_array(1, 0).row = 0
    objs_array(1, 0).col = 0
    objs_array(1, 1).row = 0
    objs_array(1, 1).col = 1
    objs_array(1, 2).row = 1
    objs_array(1, 2).col = 0
    objs_array(1, 3).row = 1
    objs_array(1, 3).col = -1
   
    objs_array(2, 0).row = -1
    objs_array(2, 0).col = -1
    objs_array(2, 1).row = 0
    objs_array(2, 1).col = -1
    objs_array(2, 2).row = 0
    objs_array(2, 2).col = 0
    objs_array(2, 3).row = 1
    objs_array(2, 3).col = 0
   
    objs_array(3, 0).row = 0
    objs_array(3, 0).col = 0
    objs_array(3, 1).row = 0
    objs_array(3, 1).col = 1
    objs_array(3, 2).row = 1
    objs_array(3, 2).col = 0
    objs_array(3, 3).row = 1
    objs_array(3, 3).col = -1
   
    ''type 2
    objs_array(4, 0).row = -1
    objs_array(4, 0).col = 0
    objs_array(4, 1).row = 0
    objs_array(4, 1).col = 0
    objs_array(4, 2).row = 0
    objs_array(4, 2).col = -1
    objs_array(4, 3).row = 1
    objs_array(4, 3).col = -1
   
    objs_array(5, 0).row = 0
    objs_array(5, 0).col = -1
    objs_array(5, 1).row = 0
    objs_array(5, 1).col = 0
    objs_array(5, 2).row = 1
    objs_array(5, 2).col = 0
    objs_array(5, 3).row = 1
    objs_array(5, 3).col = 1
   
    objs_array(6, 0).row = -1
    objs_array(6, 0).col = 0
    objs_array(6, 1).row = 0
    objs_array(6, 1).col = 0
    objs_array(6, 2).row = 0
    objs_array(6, 2).col = -1
    objs_array(6, 3).row = 1
    objs_array(6, 3).col = -1
   
    objs_array(7, 0).row = 0
    objs_array(7, 0).col = -1
    objs_array(7, 1).row = 0
    objs_array(7, 1).col = 0
    objs_array(7, 2).row = 1
    objs_array(7, 2).col = 0
    objs_array(7, 3).row = 1
    objs_array(7, 3).col = 1
   
    ''type 3
    objs_array(8, 0).row = -1
    objs_array(8, 0).col = 0
    objs_array(8, 1).row = 0
    objs_array(8, 1).col = 0
    objs_array(8, 2).row = 0
    objs_array(8, 2).col = 1
    objs_array(8, 3).row = 1
    objs_array(8, 3).col = 0
   
    objs_array(9, 0).row = -1
    objs_array(9, 0).col = 0
    objs_array(9, 1).row = 0
    objs_array(9, 1).col = 0
    objs_array(9, 2).row = 0
    objs_array(9, 2).col = -1
    objs_array(9, 3).row = 0
    objs_array(9, 3).col = 1
   
    objs_array(10, 0).row = -1
    objs_array(10, 0).col = 0
    objs_array(10, 1).row = 0
    objs_array(10, 1).col = 0
    objs_array(10, 2).row = 0
    objs_array(10, 2).col = -1
    objs_array(10, 3).row = 1
    objs_array(10, 3).col = 0
   
    objs_array(11, 0).row = 0
    objs_array(11, 0).col = -1
    objs_array(11, 1).row = 0
    objs_array(11, 1).col = 0
    objs_array(11, 2).row = 0
    objs_array(11, 2).col = 1
    objs_array(11, 3).row = 1
    objs_array(11, 3).col = 0
   
    ''type 4
    objs_array(12, 0).row = 0
    objs_array(12, 0).col = 0
    objs_array(12, 1).row = 1
    objs_array(12, 1).col = 0
    objs_array(12, 2).row = 2
    objs_array(12, 2).col = 0
    objs_array(12, 3).row = 3
    objs_array(12, 3).col = 0
   
    objs_array(13, 0).row = 0
    objs_array(13, 0).col = 0
    objs_array(13, 1).row = 0
    objs_array(13, 1).col = 1
    objs_array(13, 2).row = 0
    objs_array(13, 2).col = 2
    objs_array(13, 3).row = 0
    objs_array(13, 3).col = 3
   
    objs_array(14, 0).row = 0
    objs_array(14, 0).col = 0
    objs_array(14, 1).row = 1
    objs_array(14, 1).col = 0
    objs_array(14, 2).row = 2
    objs_array(14, 2).col = 0
    objs_array(14, 3).row = 3
    objs_array(14, 3).col = 0
   
    objs_array(15, 0).row = 0
    objs_array(15, 0).col = 0
    objs_array(15, 1).row = 0
    objs_array(15, 1).col = 1
    objs_array(15, 2).row = 0
    objs_array(15, 2).col = 2
    objs_array(15, 3).row = 0
    objs_array(15, 3).col = 3
   
    ''type 5
    objs_array(16, 0).row = 0
    objs_array(16, 0).col = 0
    objs_array(16, 1).row = 0
    objs_array(16, 1).col = 1
    objs_array(16, 2).row = 1
    objs_array(16, 2).col = 0
    objs_array(16, 3).row = 1
    objs_array(16, 3).col = 1
   
    objs_array(17, 0).row = 0
    objs_array(17, 0).col = 0
    objs_array(17, 1).row = 0
    objs_array(17, 1).col = 1
    objs_array(17, 2).row = 1
    objs_array(17, 2).col = 0
    objs_array(17, 3).row = 1
    objs_array(17, 3).col = 1
   
    objs_array(18, 0).row = 0
    objs_array(18, 0).col = 0
    objs_array(18, 1).row = 0
    objs_array(18, 1).col = 1
    objs_array(18, 2).row = 1
    objs_array(18, 2).col = 0
    objs_array(18, 3).row = 1
    objs_array(18, 3).col = 1
   
    objs_array(19, 0).row = 0
    objs_array(19, 0).col = 0
    objs_array(19, 1).row = 0
    objs_array(19, 1).col = 1
    objs_array(19, 2).row = 1
    objs_array(19, 2).col = 0
    objs_array(19, 3).row = 1
    objs_array(19, 3).col = 1
   
    ''type 6
    objs_array(20, 0).row = -2
    objs_array(20, 0).col = 0
    objs_array(20, 1).row = -1
    objs_array(20, 1).col = 0
    objs_array(20, 2).row = 0
    objs_array(20, 2).col = 0
    objs_array(20, 3).row = 0
    objs_array(20, 3).col = 1
   
    objs_array(21, 0).row = -1
    objs_array(21, 0).col = 0
    objs_array(21, 1).row = 0
    objs_array(21, 1).col = 0
    objs_array(21, 2).row = 0
    objs_array(21, 2).col = -1
    objs_array(21, 3).row = 0
    objs_array(21, 3).col = -2
   
    objs_array(22, 0).row = 0
    objs_array(22, 0).col = -1
    objs_array(22, 1).row = 0
    objs_array(22, 1).col = 0
    objs_array(22, 2).row = 1
    objs_array(22, 2).col = 0
    objs_array(22, 3).row = 2
    objs_array(22, 3).col = 0
   
    objs_array(23, 0).row = 0
    objs_array(23, 0).col = 0
    objs_array(23, 1).row = 0
    objs_array(23, 1).col = 1
    objs_array(23, 2).row = 0
    objs_array(23, 2).col = 2
    objs_array(23, 3).row = 1
    objs_array(23, 3).col = 0
   
    ''type 7
    objs_array(24, 0).row = -2
    objs_array(24, 0).col = 0
    objs_array(24, 1).row = -1
    objs_array(24, 1).col = 0
    objs_array(24, 2).row = 0
    objs_array(24, 2).col = 0
    objs_array(24, 3).row = 0
    objs_array(24, 3).col = -1
   
    objs_array(25, 0).row = 0
    objs_array(25, 0).col = -2
    objs_array(25, 1).row = 0
    objs_array(25, 1).col = -1
    objs_array(25, 2).row = 0
    objs_array(25, 2).col = 0
    objs_array(25, 3).row = 1
    objs_array(25, 3).col = 0
   
    objs_array(26, 0).row = 0
    objs_array(26, 0).col = 0
    objs_array(26, 1).row = 0
    objs_array(26, 1).col = 1
    objs_array(26, 2).row = 1
    objs_array(26, 2).col = 0
    objs_array(26, 3).row = 2
    objs_array(26, 3).col = 0
   
    objs_array(27, 0).row = -1
    objs_array(27, 0).col = 0
    objs_array(27, 1).row = 0
    objs_array(27, 1).col = 0
    objs_array(27, 2).row = 0
    objs_array(27, 2).col = 1
    objs_array(27, 3).row = 0
    objs_array(27, 3).col = 2
    End If

    Randomize
    nex_obj.typ = Int(7 * Rnd)
    nex_obj.stat = Int(4 * Rnd)
    nex_obj.color = Int(8 * Rnd) + 3
    nex_obj.pos = nextpos
    cur_obj = nex_obj
    prv_obj = cur_obj
    Call obj_draw
   
    Randomize
    cur_obj.typ = Int(7 * Rnd)
    cur_obj.stat = Int(4 * Rnd)
    cur_obj.color = Int(8 * Rnd) + 3
    cur_obj.pos = startpos
    prv_obj = cur_obj
    Call obj_draw
   
    level = 1000
    pulse = False
    interval = 800
    gaming = True
End Function

Public Function obj_left()   '游戏对象向左移动,需判断是否超越左边界
    Dim i As Long
    Dim ii As Long
    Dim nextcol As Long
    Dim collide As Boolean
   
    collide = False
    nextcol = cur_obj.pos.col - 1
   
    ii = cur_obj.typ * 4 + cur_obj.stat
   
    For i = 0 To 3
        If ((nextcol + objs_array(ii, i).col <= left) Or Cells(cur_obj.pos.row + objs_array(ii, i).row, nextcol + objs_array(ii, i).col) = " ") Then collide = True: Exit For
    Next i
    If (Not collide) Then
        prv_obj = cur_obj
        cur_obj.pos.col = nextcol
        Call obj_draw
    End If
End Function

Public Function obj_right()   '游戏对象向右移动,需判断是否超越右边界
    Dim i As Long
    Dim ii As Long
    Dim nextcol As Long
    Dim collide As Boolean
   
    collide = False
    nextcol = cur_obj.pos.col + 1
   
    ii = cur_obj.typ * 4 + cur_obj.stat
   
    For i = 1 To 3
        If ((nextcol + objs_array(ii, i).col >= right) Or Cells(cur_obj.pos.row + objs_array(ii, i).row, nextcol + objs_array(ii, i).col) = " ") Then collide = True: Exit For
    Next i
    If (Not collide) Then
        prv_obj = cur_obj
        cur_obj.pos.col = nextcol
        Call obj_draw
    End If
End Function

Public Function obj_change()   '游戏对象下落形态的改变
    Dim i As Long
    Dim ii As Long
    Dim iii As Long
    Dim iiii As Long
    Dim nextstat As Long
    Dim nextcol As Long
    Dim collide As Boolean
   
    collide = False
    nextstat = cur_obj.stat + 1
    If (nextstat >= 4) Then
        nextstat = nextstat Mod 4
    End If
    ii = cur_obj.typ * 4 + nextstat
    nextcol = cur_obj.pos.col
   
    If cur_obj.pos.col <= left + 3 Then
        For i = 0 To 3
            iii = left + 1 - cur_obj.pos.col - objs_array(ii, i).col
            If (iii >= 0 And iii > iiii) Then iiii = iii
        Next i
        nextcol = nextcol + iiii
        For i = 0 To 3
            If Cells(cur_obj.pos.row + objs_array(ii, i).row, nextcol + objs_array(ii, i).col) = " " Then collide = True: Exit For
        Next i
    ElseIf cur_obj.pos.col >= right - 5 Then
        For i = 0 To 3
            iii = cur_obj.pos.col + objs_array(ii, i).col - right + 1
            If (iii >= 0 And iii > iiii) Then iiii = iii
        Next i
        nextcol = nextcol - iiii
        For i = 0 To 3
            If Cells(cur_obj.pos.row + objs_array(ii, i).row, nextcol + objs_array(ii, i).col) = " " Then collide = True: Exit For
        Next i
    Else
        For i = 0 To 3
            If Cells(cur_obj.pos.row + objs_array(ii, i).row, nextcol + objs_array(ii, i).col) = " " Then collide = True: Exit For
        Next i
    End If
   
    If Not collide Then
        prv_obj = cur_obj
        cur_obj.stat = nextstat
        cur_obj.pos.col = nextcol
        Call obj_draw
    End If
End Function

Function obj_fall()   '游戏对象下落
    
    Dim i As Long
    Dim ii As Long
    Dim collide As Boolean
   
    Dim j As Long
    Dim k As Long
   
    Dim nextrow As Long
   
    collide = False
    ii = cur_obj.typ * 4 + cur_obj.stat
    nextrow = cur_obj.pos.row + 1

       '判断是否下落到底
   For i = 0 To 3
        If (Cells(nextrow + objs_array(ii, i).row, cur_obj.pos.col + objs_array(ii, i).col) = " " Or nextrow + objs_array(ii, i).row >= bottom) Then collide = True: Exit For
    Next i
   
    If Not collide Then
        prv_obj = cur_obj
        cur_obj.pos.row = nextrow
        Call obj_draw
    Else
        score = score + 10
        score_level = 0
       
        ii = cur_obj.typ * 4 + cur_obj.stat
        For i = 0 To 3
            Cells(cur_obj.pos.row + objs_array(ii, i).row, cur_obj.pos.col + objs_array(ii, i).col) = " "
        Next i
       
        If cur_obj.pos.row + objs_array(ii, 0).row < top Then
            top = cur_obj.pos.row + objs_array(ii, 0).row
        End If
           '这里我偷懒用了一个不具通用性的方法判断每个方块像素所在行是否已满,若满后则消去这行
        For i = 0 To 3
            For j = left + 1 To right - 1
                If Cells(cur_obj.pos.row + objs_array(ii, i).row, j) <> " " Then Exit For
            Next j
            If right - j <= 0 Then
                Cells(cur_obj.pos.row + objs_array(ii, i).row, left + 1) = "  "
                score_level = score_level + 1
            End If
        Next i

        If score_level > 0 Then
            Dim l As Long
                l = objs_array(ii, 3).row - objs_array(ii, 0).row
            Dim tmp_array(3) As Long
                For i = 0 To 3
                    tmp_array(i) = 0
                Next i
               '消去满的几行后把由消去的这几行以上到顶的所有像素向下移动
            j = cur_obj.pos.row + objs_array(ii, 3).row
            k = 0
            For i = 0 To l
                If Cells(j - i, left + 1) = "  " Then
                    Range(Cells(j - i, left + 1), Cells(j - i, right - 1)).ClearContents
                    Range(Cells(j - i, left + 1), Cells(j - i, right - 1)).Interior.ColorIndex = 0
                Else
                    Range(Cells(j - i, left + 1), Cells(j - i, right - 1)).Cut Destination:=Range(Cells(j - k, left + 1), Cells(j - k, right - 1))
                    k = k + 1
                End If
            Next i
           
            l = cur_obj.pos.row + objs_array(ii, 0).row
            If top < l Then
                Range(Cells(top, left + 1), Cells(l - 1, right - 1)).Cut Destination:=Range(Cells(top + score_level, left + 1), Cells(l - 1 + score_level, right - 1))
            End If
            Range(Cells(top, left + 1), Cells(top + score_level - 1, right - 1)).ClearContents
            Range(Cells(top, left + 1), Cells(top + score_level - 1, right - 1)).Interior.ColorIndex = 0
           
            top = top + score_level
        End If
        score = score + 50 * score_level * (1 + score_level)
        UserForm1.Label2.Caption = "Now you have the score of " + Str(score)
        If score >= level Then
            level = level + 800
            interval = interval - 150
            If interval < 50 Then
                interval = 50
            End If
            If timerset <> 0 Then
            timerset = KillTimer(0, timerset)
            End If
            pulse = False
        End If
       
        '判断方块是否堆积到顶,若未则生成下一方块,否则游戏结束
        If top > mosttop Then
            Call reinitial: Exit Function
        Else: Call game_over: Exit Function
        End If
    End If
End Function

Function obj_draw()
    Dim i As Long
    Dim ii As Long
   
    ii = prv_obj.typ * 4 + prv_obj.stat
    For i = 0 To 3
        Cells(prv_obj.pos.row + objs_array(ii, i).row, prv_obj.pos.col + objs_array(ii, i).col).Interior.ColorIndex = 0
    Next i
    ii = cur_obj.typ * 4 + cur_obj.stat
    For i = 0 To 3
        Cells(cur_obj.pos.row + objs_array(ii, i).row, cur_obj.pos.col + objs_array(ii, i).col).Interior.ColorIndex = cur_obj.color
    Next i
End Function

Function reinitial()
   
    If gaming Then
    prv_obj = nex_obj
    Randomize
    nex_obj.typ = Int(7 * Rnd)
    nex_obj.stat = Int(4 * Rnd)
    nex_obj.color = Int(8 * Rnd) + 3
    nex_obj.pos = nextpos
    cur_obj = nex_obj
    Call obj_draw
   
   cur_obj = prv_obj
    cur_obj.pos = startpos
    prv_obj = cur_obj
    Call obj_draw
    End If
End Function

Function game_over()
    If timerset <> 0 Then
        timerset = KillTimer(0, timerset)
    End If
    If MsgBox("Try it again?", vbOKCancel, "Game over temporarily") = vbOK Then
        Cells.ClearContents
        Cells.Interior.ColorIndex = 0
        Call game_initial
    Else
        Cells.ClearContents
        Cells.Interior.ColorIndex = 0
        gaming = False
        SendKeys "%{F4}"
    End If
End Function

Public Sub pulse_()
    If gaming Then
        Call obj_fall
    End If
End Sub

以上是宏部分的代码,下面引入窗体后键入如下代码

Private Sub UserForm_Initialize()
    Label1.Caption = "NO PLAY,NO GAME"
    Call game_initial
   
    If (gaming) Then
        Label2.Caption = "Move and change by ARROW keys.            Pause the game by P and end it by E"
    Else
        Label2.Caption = "Something happened. It needs to do something"
        Call game_over
    End If
End Sub

Private Sub UserForm_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
    If gaming Then
        If Not pulse Then
            pulse = True
            timerset = SetTimer(0, 0, interval, AddressOf pulse_)
            Label2.Caption = "Move and change by ARROW keys.            Pause the game by P and end it by E"
        End If
            Select Case KeyCode
                Case vbKeyLeft
                    Call obj_left
                Case vbKeyRight
                    Call obj_right
                Case vbKeyUp
                    Call obj_change
                Case vbKeyDown
                    Call obj_fall
                Case vbKeyP '销毁定时器,游戏暂停
                    If timerset <> 0 Then
                    timerset = KillTimer(0, timerset)
   pulse = False
                End If
                    Label2.Caption = "Game Paused.You can resume by ANY key"
                  
                Case vbKeyE
                    Call game_over
            End Select
    End If
   
End Sub

Private Sub UserForm_Terminate()
    MsgBox ("You have complete the game with the score of " + Str(score))
    Worksheets(1).Select
End Sub
有问题再发问吧,我都忘得七七八八了。

JAVA实战练习——俄罗斯方块(超简易版)

此文章根据网络上的视频培训而来。目的只是用来学习和研究。
  • a80C51
  • a80C51
  • 2015年10月26日 09:37
  • 12991

新手向!超详细!Java俄罗斯方块程序面向对象编程全记录

零、写在开始之前 新人,Java学习中,文章中遗漏错误之处,欢迎斧正 个人博客,完全原创 转载请注明出处。 项目全代码地址:GitHub 一、从面向对象的开始,将对象抽象成类面对...
  • sinat_32660629
  • sinat_32660629
  • 2016年10月22日 13:43
  • 17922

[前端 3]纯Js制作俄罗斯方块游戏

导读:在别人文章里看到了,然后写了一遍。结果出错了,然后调出来了,然后理解了一下,加了点注释,有一些想法。忘了在 哪一篇上面看的了,就贴不出来链接地址。原谅。呃,真没自己的东西,权当练打字了吧。其实,...
  • u013034889
  • u013034889
  • 2016年04月10日 00:08
  • 1938

QT/c++ 简易俄罗斯方块

第一次用QT写的小项目,一切为了实现效果不择手段,没注意优化算法什么,后期也懒得去改了,游戏目前还有个小bug,消两行只加一行的分数,懒鬼实在不想改了。此文单纯留作记录。另外样式表内容参考《QT CR...
  • shr903988854
  • shr903988854
  • 2017年04月23日 21:17
  • 674

VC实现俄罗斯方块的基本功能

游戏设计思路: 俄罗斯方块游戏设计的主要步骤为以下10个方面: (1)游戏界面的设计。 (2)俄罗斯方块的造型。 (3)俄罗斯方块的旋转。 (4)俄罗斯方块的运动情况(包括向左,向右和向下)。 (5)...
  • qq_26399665
  • qq_26399665
  • 2016年04月13日 13:14
  • 1334

C#实现俄罗斯方块

C#实现俄罗斯方块
  • Qian_F
  • Qian_F
  • 2014年02月23日 19:24
  • 10328

Microsoft visual Studio 2015 下的俄罗斯方块源程序以及修改过程

项目名称:贪吃蛇 项目语言:C++ 项目软件: Microsoft visual Studio 2015  错误1. 错误提要:错误使用标识符 错误定位: clrscr()  错误提示: 未定义标识符...
  • spiderxy
  • spiderxy
  • 2017年05月22日 16:54
  • 369

cocos2d-x俄罗斯方块--基于简单工厂的程序重构

1 前言 前些天看了一个Cocos2D写的俄罗斯方块代码(下载网址为:http://www.okbase.net/file/item/27944),代码逻辑很清晰。 2 讨论 俄罗斯方块游戏逻辑...
  • XIANG__jiangsu
  • XIANG__jiangsu
  • 2015年11月26日 21:32
  • 1570

shell脚本实现俄罗斯方块

draw  是画出图形界面   keytest是获取键盘  tetris是整个游戏 tetris.sh #!/bin/bash APP_NAME="${0##*[\\/]}" APP_VERSION...
  • u013467442
  • u013467442
  • 2015年05月14日 22:27
  • 2154

C#写一个“高逼格”的俄罗斯方块

首先附上代码地址:http://download.csdn.net/detail/liyuxing6639801/9855551         C#基础基本为0,希望通过一个简单的实际操作学一点C...
  • liyuxing6639801
  • liyuxing6639801
  • 2017年05月29日 21:47
  • 476
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:Excel版俄罗斯方块
举报原因:
原因补充:

(最多只允许输入30个字)