Add Kar-Ouk
[vchess.git] / client / src / variants / Karouk.js
diff --git a/client/src/variants/Karouk.js b/client/src/variants/Karouk.js
new file mode 100644 (file)
index 0000000..05e5579
--- /dev/null
@@ -0,0 +1,11 @@
+import { MakrukRules } from "@/variants/Makruk";
+
+export class KaroukRules extends MakrukRules {
+
+  getCurrentScore() {
+    const color = this.turn;
+    if (this.underCheck(color)) return (color == 'w' ? "0-1" : "1-0");
+    return super.getCurrentScore();
+  }
+
+};