import { ChessRules } from "@/base_rules";
export class ThreechecksRules extends ChessRules {
+
static IsGoodFlags(flags) {
// 4 for castle + 2 for checks (0,1 or 2)
return !!flags.match(/^[01]{4,4}[012]{2,2}$/);
return super.getCurrentScore();
}
- static GenRandInitFen(randomness) {
+ static GenRandInitFen(options) {
// Add check flags (at 0)
- return ChessRules.GenRandInitFen(randomness).slice(0, -2) + "00";
+ return ChessRules.GenRandInitFen(options).slice(0, -2) + "00";
}
getFlagsFen() {
// Take number of checks into account
return baseEval/5 - this.checkFlags["w"] + this.checkFlags["b"];
}
+
};