projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
First draft of Shinobi (unworking)
[vchess.git]
/
client
/
src
/
utils
/
playUndo.js
diff --git
a/client/src/utils/playUndo.js
b/client/src/utils/playUndo.js
index
ab11bff
..
94e642c
100644
(file)
--- a/
client/src/utils/playUndo.js
+++ b/
client/src/utils/playUndo.js
@@
-5,6
+5,7
@@
export function playMove(move, vr) {
export function undoMove(move, vr) {
if (!Array.isArray(move)) move = [move];
+ // If multi-move, undo all submoves from last to first
for (let i = move.length - 1; i >= 0; i--)
vr.undo(move[i]);
}