Almost added TitanChess + EvolutionChess
[vchess.git] / client / src / variants / Grand.js
index b88410c..398a96c 100644 (file)
@@ -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"
     );
   }
+
 };