fix(MCU课设): 修复方块移动bug
This commit is contained in:
parent
0438b82ff7
commit
926ec204cc
1 changed files with 1 additions and 2 deletions
|
@ -90,7 +90,7 @@ void genPiece()
|
||||||
//动作是否在屏幕内
|
//动作是否在屏幕内
|
||||||
unsigned char isIegal(char i, char j)
|
unsigned char isIegal(char i, char j)
|
||||||
{
|
{
|
||||||
if(i >= 0 && i < MAX_X && j >= 0 && j < MAX_Y && base[i][j] == 0)
|
if(i >= 0 && i < MAX_X && j >= 0 && j < MAX_Y && base[i][j] != 1)
|
||||||
return 1;
|
return 1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -172,7 +172,6 @@ void moveLeftPiece()
|
||||||
{
|
{
|
||||||
base[i - 1][j] = 2;
|
base[i - 1][j] = 2;
|
||||||
base[i][j] = 0;
|
base[i][j] = 0;
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void moveRightPiece()
|
void moveRightPiece()
|
||||||
|
|
Reference in a new issue