Fix parseInt() usage, rename Doubleorda --> Ordamirror, implement Clorange variant
[vchess.git] / client / src / variants / Schess.js
index 0d12b74..9511898 100644 (file)
@@ -119,12 +119,12 @@ export class SchessRules extends ChessRules {
     const fenParsed = V.ParseFen(fen);
     this.pocket = {
       "w": {
-        h: parseInt(fenParsed.pocket[0]),
-        e: parseInt(fenParsed.pocket[1])
+        h: parseInt(fenParsed.pocket[0], 10),
+        e: parseInt(fenParsed.pocket[1], 10)
       },
       "b": {
-        h: parseInt(fenParsed.pocket[2]),
-        e: parseInt(fenParsed.pocket[3])
+        h: parseInt(fenParsed.pocket[2], 10),
+        e: parseInt(fenParsed.pocket[3], 10)
       }
     };
   }
@@ -291,7 +291,6 @@ export class SchessRules extends ChessRules {
         ([V.HAWK, V.ELEPHANT, V.NOTHING].includes(move.appear[0].p) ? 1 : 0);
       this.kingPos[color][0] = move.appear[shift].x;
       this.kingPos[color][1] = move.appear[shift].y;
-      return;
     }
     this.updateCastleFlags(move, piece);