import { randInt } from "@/utils/alea";
export class DarkRules extends ChessRules {
+
// Analyse in Dark mode makes no sense
static get CanAnalyze() {
return false;
}
}
+ // To always allow castling:
+ isAttacked() {
+ return false;
+ }
+
filterValid(moves) {
// Used in the interface
return moves;
candidates.push(j);
return moves[candidates[randInt(candidates.length)]];
}
+
};