X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=public%2Fjavascripts%2Fvariants%2FAlice.js;h=00103a7bcf93fd7a1dbed0c9b8314097128eb8a5;hb=2d7194bd9c976f444e43e5dc0a725823b6472eb9;hp=ece59cdc75e06e5201de2f0168ebfbd46c5b27db;hpb=1a788978e3682ab54b77af3edfe38e0b371edbc4;p=vchess.git diff --git a/public/javascripts/variants/Alice.js b/public/javascripts/variants/Alice.js index ece59cdc..00103a7b 100644 --- a/public/javascripts/variants/Alice.js +++ b/public/javascripts/variants/Alice.js @@ -29,24 +29,24 @@ class AliceRules extends ChessRules return (Object.keys(this.ALICE_PIECES).includes(b[1]) ? "Alice/" : "") + b; } - static get PIECES() { + static get PIECES() + { return ChessRules.PIECES.concat(Object.keys(V.ALICE_PIECES)); } - initVariables(fen) + setOtherVariables(fen) { - super.initVariables(fen); - const fenParts = fen.split(" "); - const position = fenParts[0].split("/"); + super.setOtherVariables(fen); + const rows = V.ParseFen(fen).position.split("/"); if (this.kingPos["w"][0] < 0 || this.kingPos["b"][0] < 0) { - // INIT_COL_XXX won't be used, so no need to set them for Alice kings - for (let i=0; i move.appear.length ? "x" : ""); let pawnMark = ""; if (["p","s"].includes(piece) && captureMark.length == 1) - pawnMark = String.fromCharCode(97 + move.start.y); //start column + pawnMark = V.GetColumn(move.start.y); //start column // Piece or pawn movement let notation = piece.toUpperCase() + pawnMark + captureMark + finalSquare;