X-Git-Url: https://git.auder.net/assets/icon_infos.svg?a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FGrand.js;h=398a96cca55ed7316ac2ca05dbdd927f705a75b3;hb=1186fba725f3da468f8834a9b44d58993a7d86d4;hp=b88410c9a6629cfc9666ba770c648d06c51e54b8;hpb=6e0f28425075e6d2d79cab6d30bca6ce6d55f19d;p=vchess.git diff --git a/client/src/variants/Grand.js b/client/src/variants/Grand.js index b88410c9..398a96cc 100644 --- a/client/src/variants/Grand.js +++ b/client/src/variants/Grand.js @@ -5,6 +5,7 @@ import { randInt } from "@/utils/alea"; // NOTE: initial setup differs from the original; see // https://www.chessvariants.com/large.dir/freeling.html export class GrandRules extends ChessRules { + static IsGoodFen(fen) { if (!ChessRules.IsGoodFen(fen)) return false; const fenParsed = V.ParseFen(fen); @@ -55,7 +56,8 @@ export class GrandRules extends ChessRules { setOtherVariables(fen) { super.setOtherVariables(fen); - const captured = V.ParseFen(fen).captured.split("").map(parseInt); + const captured = + V.ParseFen(fen).captured.split("").map(x => parseInt(x, 10)); // Initialize captured pieces' counts from FEN this.captured = { w: { @@ -390,4 +392,5 @@ export class GrandRules extends ChessRules { " w 0 " + flags + " - 00000000000000" ); } + };