import ChessRules from "/base_rules.js";
-import { ArrayFun } from "/utils/array.js";
-import { Random } from "/utils/alea.js";
+import {ArrayFun} from "/utils/array.js";
+import {Random} from "/utils/alea.js";
export default class GiveawayRules extends ChessRules {
}
genRandInitFen(seed) {
+ if (this.options["mode"] == "losers")
+ return super.genRandInitFen(seed);
+
if (this.options["randomness"] == 0) {
return (
'rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w 0 {"enpassant":"-"}'
super(o);
}
- underCheck([x, y], oppCol) {
+ underCheck(square, oppCol) {
if (this.options["mode"] == "suicide")
return false;
- return super.underCheck([x, y], oppCol);
+ return super.underCheck(square, oppCol);
}
getCurrentScore() {