From: Benjamin Auder Date: Mon, 4 Jan 2021 18:14:21 +0000 (+0100) Subject: Forgot to update move flags in Paco-Sako X-Git-Url: https://git.auder.net/DESCRIPTION?a=commitdiff_plain;h=c27fcf891188091802bd48554a21544c751da26f;p=vchess.git Forgot to update move flags in Paco-Sako --- diff --git a/client/src/variants/Pacosako.js b/client/src/variants/Pacosako.js index b88f2e3b..bf847199 100644 --- a/client/src/variants/Pacosako.js +++ b/client/src/variants/Pacosako.js @@ -472,6 +472,7 @@ export class PacosakoRules extends ChessRules { } play(move) { + move.flags = JSON.stringify(this.aggregateFlags()); this.epSquares.push(this.getEpSquare(move)); // Check if the move is the last of the turn: all cases except releases if (!move.released) { @@ -499,6 +500,7 @@ export class PacosakoRules extends ChessRules { undo(move) { this.epSquares.pop(); + this.disaggregateFlags(JSON.parse(move.flags)); V.UndoOnBoard(this.board, move); this.lastMoveEnd.pop(); if (!move.released) {