smooth scroll left / right

This commit is contained in:
2025-11-30 12:29:09 +01:00
parent fc828dbdbc
commit 588f870b26
5 changed files with 45 additions and 9 deletions

View File

@ -64,7 +64,9 @@ void Game::reset(int startLevel_) {
_pausedTime = 0;
_lastPauseStart = 0;
hold = Piece{}; hold.type = PIECE_COUNT; canHold=true;
refillBag(); spawn();
refillBag();
pieceSequence = 0;
spawn();
}
double Game::elapsed() const {
@ -166,6 +168,7 @@ void Game::spawn() {
PieceType nextType = bag.back();
int nextSpawnY = (nextType == I) ? -2 : -1;
nextPiece = Piece{ nextType, 0, 3, nextSpawnY };
++pieceSequence;
}
bool Game::cellFilled(const Piece& p, int cx, int cy) {