X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FAllmate2.js;h=fe5e98ce1664ebf1e4e860f90a97e4d068dc9da9;hp=0e515b2dee9b3cea81c3547e8ed779818c446922;hb=188b4a8f2e3edfa86c4e9169ddac9a14ebc12689;hpb=4b24c8ac99330258005c9e7c362f1f1720b97d9a diff --git a/client/src/variants/Allmate2.js b/client/src/variants/Allmate2.js index 0e515b2d..fe5e98ce 100644 --- a/client/src/variants/Allmate2.js +++ b/client/src/variants/Allmate2.js @@ -295,7 +295,7 @@ export const VariantRules = class Allmate2Rules extends ChessRules { let notation = super.getNotation(move); // Add a capture mark (not describing what is captured...): if (move.vanish.length > 1 && move.appear.length == 1) { - if (notation.match(/^[a-h]x/)) + if (!!(notation.match(/^[a-h]x/))) // Pawn capture: remove initial "b" in bxc4 for example notation = notation.substr(1); notation = notation.replace("x","") + "X";