Tetris1
来源:互联网 发布:阿里移动推荐算法大赛 编辑:程序博客网 时间:2024/06/11 05:36
int get_row_trans(){
int current,next,row_trans=0;
for (int y=20;y>=1;y--){
current = 1;
for (int x=0;x<=9;x++)
{
next = pool_image[x][y];
if ((current ==0 && next != 0) || (current !=0 && next == 0))
{
row_trans++;
}
current = pool_image[x][y];
}
if (current==0)
row_trans++;
}
return row_trans;
}
int get_col_trans(){
int current,next,col_trans=0;
for (int x=0;x<=9;x++){
current = 1;
for (int y=20;y>=1;y--)
{
next = pool_image[x][y];
if ((current == 0 && next != 0) || (current !=0 && next == 0))
{
col_trans++;
}
current = pool_image[x][y];
}
}
return col_trans;
}
- Tetris1
- puppet nagios
- 学习笔记(5):C程序设计(第四版)谭浩强著_第八章
- How to train models of Object Detection with Discriminatively Trained Part Based Model
- 关于distinct和group by的效率问题
- 答网友关于base64算法的汉字编码问题
- Tetris1
- Android开发的一些重要知识点(二)
- 内存数据库简介
- 微软将开售82英寸Windows 8巨型平板电脑
- OpenGL 中常用的 GLUT 函数库
- php常用函数
- Tetris2
- Oracle数据库日常维护手册
- GLSurfaceView中添加button并监听click事件