Almost added TitanChess + EvolutionChess
[vchess.git] / client / src / variants / Wormhole.js
index cc9fd49..fcf63b4 100644 (file)
@@ -1,6 +1,7 @@
 import { ChessRules } from "@/base_rules";
 
 export class WormholeRules extends ChessRules {
+
   static get HasFlags() {
     return false;
   }
@@ -39,7 +40,7 @@ export class WormholeRules extends ChessRules {
         if (['K','k'].includes(row[i])) kings[row[i]]++;
         if (['x'].concat(V.PIECES).includes(row[i].toLowerCase())) sumElts++;
         else {
-          const num = parseInt(row[i]);
+          const num = parseInt(row[i], 10);
           if (isNaN(num)) return false;
           sumElts += num;
         }
@@ -327,4 +328,5 @@ export class WormholeRules extends ChessRules {
       notation += "=" + move.appear[0].p.toUpperCase();
     return notation;
   }
+
 };