Add first draft of 'Victor Chess'
authorBenjamin Auder <benjamin.auder@somewhere>
Mon, 20 Jul 2020 09:50:48 +0000 (11:50 +0200)
committerBenjamin Auder <benjamin.auder@somewhere>
Mon, 20 Jul 2020 09:50:48 +0000 (11:50 +0200)
client/src/variants/Vchess.js [new file with mode: 0644]

diff --git a/client/src/variants/Vchess.js b/client/src/variants/Vchess.js
new file mode 100644 (file)
index 0000000..4e84eb0
--- /dev/null
@@ -0,0 +1,17 @@
+import { ChessRules } from "@/base_rules";
+
+export class VchessRules extends ChessRules {
+  static get PawnSpecs() {
+    return Object.assign(
+      {},
+      ChessRules.PawnSpecs,
+      { captureBackward: true }
+    );
+  }
+
+  getNotation(move) {
+    let notation = super.getNotation(move);
+    // TODO: if capture backwards, add an indication 'b'
+    return notation;
+  }
+};