X-Git-Url: https://git.auder.net/doc/screen_ranking.png?a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FBaroque.js;h=8f1f9ba079b0b23ed44777fff817aa0b26459ea7;hb=658c47bf5843fb0855659f22f7b1c38318c66ce5;hp=5687e22c7416e760149eb18cefd4a2661d4de216;hpb=78d64531113d4b5045ff588dd43f301a332ebae8;p=vchess.git diff --git a/client/src/variants/Baroque.js b/client/src/variants/Baroque.js index 5687e22c..8f1f9ba0 100644 --- a/client/src/variants/Baroque.js +++ b/client/src/variants/Baroque.js @@ -11,17 +11,17 @@ export const VariantRules = class BaroqueRules extends ChessRules { return false; } - static getPpath(b) { + static get PIECES() { + return ChessRules.PIECES.concat([V.IMMOBILIZER]); + } + + getPpath(b) { if (b[1] == "m") //'m' for Immobilizer (I is too similar to 1) return "Baroque/" + b; return b; //usual piece } - static get PIECES() { - return ChessRules.PIECES.concat([V.IMMOBILIZER]); - } - // No castling, but checks, so keep track of kings setOtherVariables(fen) { this.kingPos = { w: [-1, -1], b: [-1, -1] }; @@ -591,7 +591,8 @@ export const VariantRules = class BaroqueRules extends ChessRules { } else if (move.appear[0].p == V.KING) notation = "K" + (move.vanish.length > 1 ? "x" : "") + finalSquare; else notation = move.appear[0].p.toUpperCase() + finalSquare; - if (move.vanish.length > 1 && move.appear[0].p != V.KING) notation += "X"; //capture mark (not describing what is captured...) + // Add a capture mark (not describing what is captured...): + if (move.vanish.length > 1 && move.appear[0].p != V.KING) notation += "X"; return notation; } };