📄 blocked.c
字号:
#include "libepc.h"
#include "tetris.h"
/* ------------------------------------------------------------ */
/* Returns TRUE if painting the Tetris object at the specified */
/* coordinates would overwrite another object already there. */
/* Also returns TRUE if the object has reached the bottom. */
/* ------------------------------------------------------------ */
BOOL Blocked(int row, int col, int rot)
{
int r ;
if (row >= 23) return TRUE ;
for (r = 0; r < 2; r++)
{
int c ;
for (c = 0; c < 4; c++)
{
if (!On(rot, r, c)) continue ;
if (*Cell(row + r, col + c) != EMPTY)
{
return TRUE ;
}
}
}
return FALSE ;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -