Some fixes, and add 2 variants: Checkless and Parachute
[vchess.git] / client / src / variants / Recycle.js
index 8980c72..adaceb0 100644 (file)
@@ -21,16 +21,10 @@ export class RecycleRules extends ChessRules {
 
   static ParseFen(fen) {
     const fenParts = fen.split(" ");
-    return Object.assign(ChessRules.ParseFen(fen), {
-      reserve: fenParts[5]
-    });
-  }
-
-  getEpSquare(moveOrSquare) {
-    if (typeof moveOrSquare !== "object" || moveOrSquare.vanish.length > 0)
-      return super.getEpSquare(moveOrSquare);
-    // Landing move: no en-passant
-    return undefined;
+    return Object.assign(
+      ChessRules.ParseFen(fen),
+      { reserve: fenParts[5] }
+    );
   }
 
   static GenRandInitFen(randomness) {