diff --git a/takhta.html b/takhta.html index 811712a..e1b797a 100644 --- a/takhta.html +++ b/takhta.html @@ -211,11 +211,19 @@ -

+

+

+ + + +

+

+

+

-

+

@@ -650,6 +658,20 @@ return true; } + function undoAll() { + while (moveHistory.length > 0) { + undoMove(); + } + } + + function redoAll() { + while (moveFuture.length > 0) { + if (!redoMove()) { + break; + } + } + } + function flipBoard() { let oldBoard = document.getElementById('board').firstElementChild;