X-Git-Url: https://git.auder.net/images/pieces/current/gitweb.js?a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FAllmate.js;h=5636f5682194bf9128dbab0a64b71bf633dee642;hb=658c47bf5843fb0855659f22f7b1c38318c66ce5;hp=2fa56b57d55c19584b9ca6a385531a7fafe0c4e6;hpb=094e11f228623dae26d1c93813db4deaebca293d;p=vchess.git diff --git a/client/src/variants/Allmate.js b/client/src/variants/Allmate.js index 2fa56b57..5636f568 100644 --- a/client/src/variants/Allmate.js +++ b/client/src/variants/Allmate.js @@ -290,12 +290,11 @@ export const VariantRules = class AllmateRules extends ChessRules { getNotation(move) { let notation = super.getNotation(move); // Add a capture mark (not describing what is captured...): - if (move.vanish.length > 1 && move.appear[0].p != V.KING) { - if (notation.match(/^[a-h]/)) - // Pawn capture: remove "bx" in bxc4 for example - notation = notation.substr(2); - else - notation = notation.replace("x","") + "X"; + if (move.vanish.length > 1 && move.appear.length == 1) { + if (notation.match(/^[a-h]x/)) + // Pawn capture: remove initial "b" in bxc4 for example + notation = notation.substr(1); + notation = notation.replace("x","") + "X"; } return notation; }