From e0953a57980cc933045cf93cd4c87a95334d7813 Mon Sep 17 00:00:00 2001
From: Benjamin Auder <benjamin.auder@somewhere>
Date: Mon, 30 Mar 2020 03:09:57 +0200
Subject: [PATCH] Forbid capturing wall in Omega chess...

---
 client/src/variants/Omega.js | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/client/src/variants/Omega.js b/client/src/variants/Omega.js
index 7b5576cf..5431198b 100644
--- a/client/src/variants/Omega.js
+++ b/client/src/variants/Omega.js
@@ -228,6 +228,14 @@ export class OmegaRules extends ChessRules {
     return res.slice(0, -1); //remove last comma
   }
 
+  canTake([x1, y1], [x2, y2]) {
+    return (
+      // Cannot take wall :)
+      this.board[x2][y2] != V.NOTHING &&
+      this.getColor(x1, y1) !== this.getColor(x2, y2)
+    );
+  }
+
   // En-passant after 2-sq or 3-sq jumps
   getEpSquare(moveOrSquare) {
     if (!moveOrSquare) return undefined;
-- 
2.44.0