From 3c5afc01c8f4a6f0d40c454a5c8dcf3097768379 Mon Sep 17 00:00:00 2001 From: cmclark00 Date: Tue, 25 Mar 2025 17:22:33 -0400 Subject: [PATCH] Fix next piece preview not updating on mobile --- script.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/script.js b/script.js index aeb234b..e0f996f 100644 --- a/script.js +++ b/script.js @@ -535,7 +535,8 @@ class Piece { } else { // If can't move down, lock the piece this.lock(); - p = randomPiece(); + // Replace with getNextPiece function call instead of direct assignment + getNextPiece(); p.calculateShadowY(); // Calculate shadow for new piece } @@ -652,8 +653,8 @@ class Piece { // Lock the piece this.lock(); - // Get new piece - p = randomPiece(); + // Replace with getNextPiece function call instead of direct assignment + getNextPiece(); // Calculate shadow for new piece p.calculateShadowY();