You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
415 B
C
21 lines
415 B
C
bool MoveDown() { // returns true if the game has ended as a result of this move
|
|
int y, x;
|
|
if(PrepForMove(&y, &x)){
|
|
curpiece_->move(y + 1, x);
|
|
if(InvalidMove()){
|
|
curpiece_->move(y, x);
|
|
if(y <= board_top_y_ - 1){
|
|
return true;
|
|
}
|
|
if(LockPiece()){
|
|
return true;
|
|
}
|
|
curpiece_ = NewPiece();
|
|
}else{
|
|
++y;
|
|
}
|
|
nc_.render();
|
|
}
|
|
return false;
|
|
}
|