tetris: factor out MoveLateral()

This commit is contained in:
nick black 2020-04-07 16:00:32 -04:00
parent 37b5564722
commit 2852ff736c
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC
2 changed files with 0 additions and 19 deletions

View File

@ -1,19 +0,0 @@
void MoveRight() {
const std::lock_guard<std::mutex> lock(mtx_);
int y, x;
if(PrepForMove(&y, &x)){
if(!curpiece_->move(y, x + 2)){
throw TetrisNotcursesErr("move()");
}
if(InvalidMove()){
if(!curpiece_->move(y, x)){
throw TetrisNotcursesErr("move()");
}
}else{
x += 2;
if(!nc_.render()){
throw TetrisNotcursesErr("render()");
}
}
}
}