From: Benjamin Auder Date: Wed, 17 Feb 2021 18:34:14 +0000 (+0100) Subject: Fix Chakart notation X-Git-Url: https://git.auder.net/%7B%7B%20asset%28%27mixstore/images/assets/doc/img/common.css?a=commitdiff_plain;h=580c3d090e883cef5815e1bd4eefc94758c7df16;p=vchess.git Fix Chakart notation --- diff --git a/client/src/variants/Chakart.js b/client/src/variants/Chakart.js index f170f707..5f20132e 100644 --- a/client/src/variants/Chakart.js +++ b/client/src/variants/Chakart.js @@ -1422,7 +1422,7 @@ export class ChakartRules extends ChessRules { let notation = undefined; if (piece == V.PAWN) { // Pawn move - if (move.vanish.length >= 2) { + if (this.board[move.end.x][move.end.y] != V.EMPTY) { // Capture const startColumn = V.CoordToColumn(move.start.y); notation = startColumn + "x" + finalSquare; @@ -1435,7 +1435,7 @@ export class ChakartRules extends ChessRules { else { notation = piece.toUpperCase() + - (move.vanish.length >= 2 ? "x" : "") + + (this.board[move.end.x][move.end.y] != V.EMPTY ? "x" : "") + finalSquare; } if (!!move.end.effect) {