Add Ambiguous. Fix a few issues with FEN generation / options
[xogo.git] / variants / Suction / class.js
index f9cf26d..e2e36c8 100644 (file)
@@ -42,8 +42,8 @@ export default class SuctionRules extends ChessRules {
   }
 
   genRandInitFen(seed) {
-    const gr = new GiveawayRules(
-      {mode: "suicide", options: this.options, genFenOnly: true});
+    const options = Object.assign({mode: "suicide"}, this.options);
+    const gr = new GiveawayRules({options: options, genFenOnly: true});
     // Add empty cmove:
     return (
       gr.genRandInitFen(seed).slice(0, -17) + '{"enpassant":"-","cmove":"-"}');