import { shuffle } from "@/utils/alea";
export class MaximaRules extends ChessRules {
+
+ static get Options() {
+ return null;
+ }
+
static get HasFlags() {
return false;
}
if (piece == V.KING) j = j % V.size.y;
while (V.OnBoard(i, j) && this.board[i][j] == V.EMPTY) {
moves.push(this.getBasicMove(initSquare, [i, j]));
- if (!!oneStep) continue outerLoop;
+ if (oneStep) continue outerLoop;
i += step[0];
j += step[1];
}
}
getPotentialGuardMoves(sq) {
- return (
- this.getSlideNJumpMoves(
- sq,
- V.steps[V.ROOK].concat(V.steps[V.BISHOP]),
- "oneStep",
- null
- )
- );
+ return this.getSlideNJumpMoves(
+ sq, V.steps[V.ROOK].concat(V.steps[V.BISHOP]), "oneStep");
}
getNextMageSteps(step) {
}
isAttackedByGuard(sq, color) {
- return (
- super.isAttackedBySlideNJump(
- sq,
- color,
- V.GUARD,
- V.steps[V.ROOK].concat(V.steps[V.BISHOP]),
- "oneStep"
- )
- );
+ return super.isAttackedBySlideNJump(
+ sq, color, V.GUARD, V.steps[V.ROOK].concat(V.steps[V.BISHOP]), 1);
}
getNextMageCheck(step) {
if (move.vanish.length > 1 && move.appear[0].p != V.KING) notation += "X";
return notation;
}
+
};