import { randInt } from "@/utils/alea";
export class SittuyinRules extends ChessRules {
+
+ static get Options() {
+ return null;
+ }
+
static get HasFlags() {
return false;
}
return false;
}
+ static get Monochrome() {
+ return true;
+ }
+
+ static get Notoodark() {
+ return true;
+ }
+
+ static get Lines() {
+ return ChessRules.Lines.concat([
+ [[0, 0], [8, 8]],
+ [[0, 8], [8, 0]]
+ ]);
+ }
+
static get PawnSpecs() {
return Object.assign(
{},
ChessRules.PawnSpecs,
{
- twoSquares: false,
// Promotions are handled differently here
promotions: [V.QUEEN]
}
getPotentialBishopMoves(sq) {
const forward = (this.turn == 'w' ? -1 : 1);
return this.getSlideNJumpMoves(
- sq,
- V.steps[V.BISHOP].concat([ [forward, 0] ]),
- "oneStep"
- );
+ sq, V.steps[V.BISHOP].concat([ [forward, 0] ]), 1);
}
getPotentialQueenMoves(sq) {
- return this.getSlideNJumpMoves(
- sq,
- V.steps[V.BISHOP],
- "oneStep"
- );
+ return this.getSlideNJumpMoves(sq, V.steps[V.BISHOP], 1);
}
getAllValidMoves() {
isAttackedByBishop(sq, color) {
const forward = (this.turn == 'w' ? 1 : -1);
return this.isAttackedBySlideNJump(
- sq,
- color,
- V.BISHOP,
- V.steps[V.BISHOP].concat([ [forward, 0] ]),
- "oneStep"
- );
+ sq, color, V.BISHOP, V.steps[V.BISHOP].concat([ [forward, 0] ]), 1);
}
isAttackedByQueen(sq, color) {
return this.isAttackedBySlideNJump(
- sq,
- color,
- V.QUEEN,
- V.steps[V.BISHOP],
- "oneStep"
- );
+ sq, color, V.QUEEN, V.steps[V.BISHOP], 1);
}
underCheck(color) {
}
return super.getNotation(move);
}
+
};