X-Git-Url: https://git.auder.net/pieces/Cwda/n_black_bishop.svg?a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FPacosako.js;h=bf847199256520876590623bbf359f2cb4b364b1;hb=057e34c4b970db0b1b19dcb44ec58ec7afdb9bc0;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) {