X-Git-Url: https://git.auder.net/assets/icon_infos.svg?a=blobdiff_plain;ds=sidebyside;f=client%2Fsrc%2Fvariants%2FPacosako.js;h=bf847199256520876590623bbf359f2cb4b364b1;hb=c27fcf891188091802bd48554a21544c751da26f;hp=b88f2e3b4a7d89c8cd4452109ff1ad8d69b79942;hpb=231bba397e6ed8aa2c06ba0568f47419b5d16a10;p=vchess.git 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) {