From 9aec0ce61bfa527b58256370994cb57983461940 Mon Sep 17 00:00:00 2001
From: Benjamin Auder <benjamin.auder@somewhere>
Date: Sat, 30 Jan 2021 23:22:26 +0100
Subject: [PATCH] Fix Dark Chess: always can castle

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

diff --git a/client/src/variants/Dark.js b/client/src/variants/Dark.js
index fd6d5719..e7ba40ce 100644
--- a/client/src/variants/Dark.js
+++ b/client/src/variants/Dark.js
@@ -83,6 +83,11 @@ export class DarkRules extends ChessRules {
     }
   }
 
+  // To always allow castling:
+  isAttacked() {
+    return false;
+  }
+
   filterValid(moves) {
     // Used in the interface
     return moves;
-- 
2.44.0