projects
/
vchess.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6f252cc
)
Fix double-move sending in corr games
author
Benjamin Auder
<benjamin.auder@somewhere>
Fri, 3 Apr 2020 22:16:47 +0000
(
00:16
+0200)
committer
Benjamin Auder
<benjamin.auder@somewhere>
Fri, 3 Apr 2020 22:16:47 +0000
(
00:16
+0200)
client/src/views/Game.vue
patch
|
blob
|
blame
|
history
diff --git
a/client/src/views/Game.vue
b/client/src/views/Game.vue
index
8b5ca8b
..
398a0a2
100644
(file)
--- a/
client/src/views/Game.vue
+++ b/
client/src/views/Game.vue
@@
-1451,9
+1451,12
@@
export default {
}
);
// PlayOnBoard is enough, and more appropriate for Synchrone Chess
}
);
// PlayOnBoard is enough, and more appropriate for Synchrone Chess
- V.PlayOnBoard(this.vr.board, move);
+ const arMove = (Array.isArray(move) ? move : [move]);
+ for (let i = 0; i < arMove.length; i++)
+ V.PlayOnBoard(this.vr.board, arMove[i]);
const position = this.vr.getBaseFen();
const position = this.vr.getBaseFen();
- V.UndoOnBoard(this.vr.board, move);
+ for (let i = arMove.length - 1; i >= 0; i--)
+ V.UndoOnBoard(this.vr.board, arMove[i]);
if (["all","byrow"].includes(V.ShowMoves)) {
this.curDiag = getDiagram({
position: position,
if (["all","byrow"].includes(V.ShowMoves)) {
this.curDiag = getDiagram({
position: position,