diff --git a/src/tetris/stuck.h b/src/tetris/stuck.h index 0b47d6515..a77245476 100644 --- a/src/tetris/stuck.h +++ b/src/tetris/stuck.h @@ -6,6 +6,17 @@ bool PieceStuck() { int y, x; curpiece_->get_dim(&y, &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 curpiece_->translate(*board_, &cmpy, &cmpx); ncpp::Cell c;