X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=client%2Fsrc%2Fviews%2FGame.vue;h=398a0a27d3ed8c9e0281203a5294013fa1b7e224;hp=8b5ca8b6b9a55199d93310daff75799619bce086;hb=12d38d0f53f4ab534e44467550b72705858810d4;hpb=6f252ccbf794acae91aa51e45244fd2696d9b4cf diff --git a/client/src/views/Game.vue b/client/src/views/Game.vue index 8b5ca8b6..398a0a27 100644 --- 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 - 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(); - 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,