您的位置首页生活快答

求VB高手帮我解释下这段俄罗斯方块代码的意思吧

求VB高手帮我解释下这段俄罗斯方块代码的意思吧

的有关信息介绍如下:

求VB高手帮我解释下这段俄罗斯方块代码的意思吧

Public Const BlockSize As Long = 4 //定义公共常量BlockSize=4

Public Type BlockInfo

Box(0 To BlockSize - 1, 0 To BlockSize - 1) As Byte

End Type //定义BlockInfo类型数组Box(0 To BlockSize - 1, 0 To BlockSize - 1)

Public Const RotateStatusCount As Long = 4 //定义公共常量RotateStatusCount=4

Public Const BlockCount As Long = 5 定义公共常量BlockCount=5

Public Blocks(0 To RotateStatusCount - 1, 0 To BlockCount - 1) As BlockInfo ////定义数组Blocks(0 To RotateStatusCount - 1, 0 To BlockCount - 1)作为BlockInfo类型

补充说明:BlockSize指方块的大小。Box(0 To BlockSize - 1, 0 To BlockSize - 1)应该是显示下一个要落下的方块的预览区,所以是4*4的。RotateStatusCount是指落下的方块的朝向,有上下左右四种,所以等于4。BlockCount指方块的数量,等于5,应该指的是预览区中下一个方块的最大数量为5。Blocks(0 To RotateStatusCount - 1, 0 To BlockCount - 1)应该是指落下的方块的状态,包括朝向即个数。

还解析 我晕 自己找算法书去看