v6: кнопка Перемешать работает после победы
This commit is contained in:
parent
2f64bf86e1
commit
b2072d83bb
@ -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 = [];
|
||||
}
|
||||
|
||||
isAnimating = false;
|
||||
|
||||
function nextMove() {
|
||||
if (currentMove >= moves) return;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user