| 编程中国 | 业界新闻 | 技术文章 | 视频教程 | 下载频道 | 程序源码 | 个人空间 | 编程论坛
全能ASP/PHP/ASP.NET主机,支持月付专业 MSSQL 数据库空间,支持月付专业 MySQL 数据库空间,支持月付学习型 ASP/PHP/ASP.NET 主机 30元/年
高端软件开发 = 年薪十万不是梦赛孚耐:软件保护加密专家身份认证令牌USB KEY 
共有 232 人关注过本帖
标题:请教一个俄罗斯方块的问题
收藏  订阅  推荐  打印 
lj3217734
Rank: 1
等级:新手上路
帖子:16
积分:260
注册:2006-3-1
请教一个俄罗斯方块的问题

在头文件中的部分定义:
/*各种不同形状方块的接触面,接触面是指这样的小方块:它下面如果有另外的方块则表示此方块已到底。此数组记录了这些接触面在当前方块动态位置数组中的元素号*/
int InterFace[74][4];
/*用于标志方块状态的数组,大小由横格与竖格数据决定,为1表示该方块显示,或者不显示画形状只需要修改数组中相应元素的状态值即可由时钟控制,定时在OnPaint函数中根据数组画方块*/
int GameStatus[100][100];
//赋初值
for (i=0;i<100;i++)
for (j=0;j<100;j++)
GameStatus[i][j]=0;

//各种形状方块的接触面数据,参见设计书的接触面表格, 如果某种形状的方块没有4个接触面,则后面的数据填-1
for (i=0;i<74;i++)
for (j=0;j<4;j++)
InterFace[i][j] = -1;

InterFace[1][0] = 3;

InterFace[11][0]=0;InterFace[11][1]=1;InterFace[11][2]=2;InterFace[11][3]=3;

InterFace[2][0] = 1; InterFace[2][1] = 3;

InterFace[3][0] = 0; InterFace[3][1] = 2; InterFace[3][2] = 3;

InterFace[31][0] = 2; InterFace[31][1] = 3;

InterFace[32][0] = 0; InterFace[32][1] = 2; InterFace[32][2] = 3;

InterFace[33][0] = 0; InterFace[33][1] = 3;

InterFace[4][0] = 1; InterFace[4][1] = 3;

InterFace[41][0] = 0; InterFace[41][1] = 2; InterFace[41][2] = 3;

InterFace[5][0] = 1; InterFace[5][1] = 3;

InterFace[51][0] = 0; InterFace[51][1] = 2; InterFace[51][2] = 3;

InterFace[6][0] = 0; InterFace[6][1] = 3;

InterFace[61][0] = 1; InterFace[61][1] = 2; InterFace[61][2] = 3;

InterFace[62][0] = 2; InterFace[62][1] = 3;

InterFace[63][0] = 0; InterFace[63][1] = 1; InterFace[63][2] = 3;

InterFace[7][0] = 2; InterFace[7][1] = 3;

InterFace[71][0] = 1; InterFace[71][1] = 2; InterFace[71][2] = 3;

InterFace[72][0] = 0; InterFace[72][1] = 3;

InterFace[73][0] = 0; InterFace[73][1] = 1; InterFace[73][2] = 3;

}

上面这么一段让人费解的代码是什么意思啊?
搜索更多相关主题的帖子: 方块  接触面  Gam  定义  
2006-3-20 09:24
关于我们 | 广告合作 | 编程中国 | 清除Cookies | Archiver | WAP | TOP

编程中国 版权所有,并保留所有权利。鲁ICP备08000592号
Powered by Discuz, Processed in 0.049877 second(s), 9 queries.
Copyright©2004-2008, BCCN.NET, All Rights Reserved