v6: кнопка Перемешать работает после победы

This commit is contained in:
Naz 2026-09-16 10:15:52 +00:00
parent 2f64bf86e1
commit b2072d83bb

View File

@ -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;