sure_sign.c
来自「用linuX 下的C语言 运用CURSES编写的俄罗斯方块游戏」· C语言 代码 · 共 28 行
C
28 行
#include"header.c"
void sure_sign()
{
////////////////////make sure the rightest sign of the array
//此段代码用来确定方块数组中,有1的最右坐标,并把值保存在变量K中
k=-1;
for(j=3;j>=0;j--)
{
for(i=0;i<3;i++)
if(stone_s[type][view][i][j]!=0)
{ k=j;break;}
if(k==j) break;
}
////////////////////make sure the rightest sign of the array
//此段代码用来确定v_win方块数组中,有1的最右坐标,并把值保存在变量K中
if(s_flag==2)
{
v_k=-1;
for(j=3;j>=0;j--)
{
for(i=0;i<3;i++)
if(stone_s[v_type][v_view][i][j]!=0)
{ v_k=j;break;}
if(v_k==j) break;
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?