Fix next piece preview not updating on mobile

This commit is contained in:
cmclark00 2025-03-25 17:22:33 -04:00
parent 71afcdee75
commit 3c5afc01c8

View file

@ -535,7 +535,8 @@ class Piece {
} else { } else {
// If can't move down, lock the piece // If can't move down, lock the piece
this.lock(); this.lock();
p = randomPiece(); // Replace with getNextPiece function call instead of direct assignment
getNextPiece();
p.calculateShadowY(); // Calculate shadow for new piece p.calculateShadowY(); // Calculate shadow for new piece
} }
@ -652,8 +653,8 @@ class Piece {
// Lock the piece // Lock the piece
this.lock(); this.lock();
// Get new piece // Replace with getNextPiece function call instead of direct assignment
p = randomPiece(); getNextPiece();
// Calculate shadow for new piece // Calculate shadow for new piece
p.calculateShadowY(); p.calculateShadowY();