|
|
@ -6,6 +6,17 @@ bool PieceStuck() {
|
|
|
|
int y, x;
|
|
|
|
int y, x;
|
|
|
|
curpiece_->get_dim(&y, &x);
|
|
|
|
curpiece_->get_dim(&y, &x);
|
|
|
|
while(x--){
|
|
|
|
while(x--){
|
|
|
|
|
|
|
|
ncpp::Cell piecec;
|
|
|
|
|
|
|
|
if(curpiece_->get_at(y - 1, x, &piecec) < 0){
|
|
|
|
|
|
|
|
throw TetrisNotcursesErr("get_at()");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if(!piecec.get().gcluster || piecec.get().gcluster == ' '){
|
|
|
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
const char* egc = curpiece_->get_extended_gcluster(piecec);
|
|
|
|
|
|
|
|
if(strcmp(egc, "▄") && strcmp(egc, "█")){
|
|
|
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
}
|
|
|
|
int cmpy = y, cmpx = x; // need game area coordinates via translation
|
|
|
|
int cmpy = y, cmpx = x; // need game area coordinates via translation
|
|
|
|
curpiece_->translate(*board_, &cmpy, &cmpx);
|
|
|
|
curpiece_->translate(*board_, &cmpy, &cmpx);
|
|
|
|
ncpp::Cell c;
|
|
|
|
ncpp::Cell c;
|
|
|
|