Fix Dark Chess: always can castle
authorBenjamin Auder <benjamin.auder@somewhere>
Sat, 30 Jan 2021 22:22:26 +0000 (23:22 +0100)
committerBenjamin Auder <benjamin.auder@somewhere>
Sat, 30 Jan 2021 22:22:26 +0000 (23:22 +0100)
client/src/variants/Dark.js

index fd6d571..e7ba40c 100644 (file)
@@ -83,6 +83,11 @@ export class DarkRules extends ChessRules {
     }
   }
 
+  // To always allow castling:
+  isAttacked() {
+    return false;
+  }
+
   filterValid(moves) {
     // Used in the interface
     return moves;