v6: кнопка Перемешать работает после победы
This commit is contained in:
parent
2f64bf86e1
commit
b2072d83bb
@ -576,16 +576,19 @@ function getRotationAxis(layer) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function scramble(reset = true) {
|
function scramble(reset = true) {
|
||||||
if (isAnimating) return;
|
|
||||||
|
|
||||||
const layers = ['U', 'D', 'L', 'R', 'F', 'B'];
|
const layers = ['U', 'D', 'L', 'R', 'F', 'B'];
|
||||||
const moves = 20;
|
const moves = 20;
|
||||||
let currentMove = 0;
|
let currentMove = 0;
|
||||||
|
|
||||||
if (reset) {
|
if (reset) {
|
||||||
resetGame();
|
resetGame();
|
||||||
}
|
} else {
|
||||||
|
document.getElementById('winMessage').classList.remove('show');
|
||||||
|
document.getElementById('overlay').classList.remove('show');
|
||||||
moveHistory = [];
|
moveHistory = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
isAnimating = false;
|
||||||
|
|
||||||
function nextMove() {
|
function nextMove() {
|
||||||
if (currentMove >= moves) return;
|
if (currentMove >= moves) return;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user