Add a few variants
[xogo.git] / variants / Recycle / class.js
diff --git a/variants/Recycle/class.js b/variants/Recycle/class.js
new file mode 100644 (file)
index 0000000..82458a9
--- /dev/null
@@ -0,0 +1,29 @@
+import ChessRules from "/base_rules.js";
+
+export default class RecycleRules extends ChessRules {
+
+  static get Options() {
+    return {
+      select: C.Options.select,
+      check: [
+        {
+          label: "Capture king",
+          defaut: false,
+          variable: "taking"
+        },
+        {
+          label: "Falling pawn",
+          defaut: true,
+          variable: "pawnfall"
+        }
+      ],
+      styles: C.Options.styles.filter(s => s != "recycle")
+    };
+  }
+
+  constructor(o) {
+    o.options["recycle"] = true;
+    super(o);
+  }
+
+};