X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FAllmate2.js;h=fe5e98ce1664ebf1e4e860f90a97e4d068dc9da9;hb=188b4a8f2e3edfa86c4e9169ddac9a14ebc12689;hp=34a0f8b0098499b4799607120a776f577c0635aa;hpb=9618937e4a56277f35cbd2dd22078c61bb3f47d4;p=vchess.git diff --git a/client/src/variants/Allmate2.js b/client/src/variants/Allmate2.js index 34a0f8b0..fe5e98ce 100644 --- a/client/src/variants/Allmate2.js +++ b/client/src/variants/Allmate2.js @@ -10,8 +10,8 @@ export const VariantRules = class Allmate2Rules extends ChessRules { return []; } - static GenRandInitFen() { - return ChessRules.GenRandInitFen().replace(/ -$/, ""); + static GenRandInitFen(randomness) { + return ChessRules.GenRandInitFen(randomness).replace(/ -$/, ""); } getPotentialMovesFrom([x, y]) { @@ -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";