Attempt to clarify installation instructions a little
[vchess.git] / client / src / variants / Dark.js
index 65934e6..e7ba40c 100644 (file)
@@ -3,6 +3,7 @@ import { ArrayFun } from "@/utils/array";
 import { randInt } from "@/utils/alea";
 
 export class DarkRules extends ChessRules {
+
   // Analyse in Dark mode makes no sense
   static get CanAnalyze() {
     return false;
@@ -82,6 +83,11 @@ export class DarkRules extends ChessRules {
     }
   }
 
+  // To always allow castling:
+  isAttacked() {
+    return false;
+  }
+
   filterValid(moves) {
     // Used in the interface
     return moves;
@@ -269,4 +275,5 @@ export class DarkRules extends ChessRules {
       candidates.push(j);
     return moves[candidates[randInt(candidates.length)]];
   }
+
 };