diff --git a/index.html b/index.html index 10c44a1..004457f 100644 --- a/index.html +++ b/index.html @@ -576,16 +576,19 @@ function getRotationAxis(layer) { } function scramble(reset = true) { - if (isAnimating) return; - const layers = ['U', 'D', 'L', 'R', 'F', 'B']; const moves = 20; let currentMove = 0; if (reset) { resetGame(); + } else { + document.getElementById('winMessage').classList.remove('show'); + document.getElementById('overlay').classList.remove('show'); + moveHistory = []; } - moveHistory = []; + + isAnimating = false; function nextMove() { if (currentMove >= moves) return;