Avoid direct references to (Dark) variant name in BaseGame, Analyse and Board
[vchess.git] / client / src / variants / Dark.js
index 358362c..cdacf9d 100644 (file)
@@ -3,7 +3,16 @@ import { ArrayFun } from "@/utils/array";
 import { randInt } from "@/utils/alea";
 
 export const VariantRules = class DarkRules extends ChessRules {
-  // Standard rules, in the shadow
+  // Analyse in Dark mode makes no sense
+  static get CanAnalyse() {
+    return false;
+  }
+
+  // Moves are revealed only when game ends
+  static get ShowMoves() {
+    return "none";
+  }
+
   setOtherVariables(fen) {
     super.setOtherVariables(fen);
     const [sizeX, sizeY] = [V.size.x, V.size.y];