X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FAllmate.js;h=5636f5682194bf9128dbab0a64b71bf633dee642;hp=2fa56b57d55c19584b9ca6a385531a7fafe0c4e6;hb=23ecf00824691b5622b468e0409fc543c87d75dc;hpb=3b959cfaf3d3a28373d7ebb48d80087150a98006 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; }