import { ArrayFun } from "@/utils/array";
export class RugbyRules extends ChessRules {
+
+ static get Options() {
+ return null;
+ }
+
static get HasFlags() {
return false;
}
);
}
+ scanKings() {}
+
getPotentialMovesFrom(sq) {
// There are only pawns:
return this.getPotentialPawnMoves(sq);
this.turn == 'w'
? [ [-1,-1], [-1,1], [0,1], [0,-1], [1,-1], [1,0], [1,1] ]
: [ [1,-1], [1,1], [0,1], [0,-1], [-1,-1], [-1,0], [-1,1] ];
- let addMoves = this.getSlideNJumpMoves(sq, steps, "oneStep");
+ let addMoves = this.getSlideNJumpMoves(sq, steps, 1);
return moves.concat(addMoves.filter(m => m.vanish.length == 1));
}
preUndo() {}
postUndo() {}
+ getCheckSquares() {
+ return [];
+ }
+
getCurrentScore() {
// Turn has changed:
const color = V.GetOppCol(this.turn);
// Stalemate (will probably never happen)
return "1/2";
}
+
+ getNotation(move) {
+ return V.CoordsToSquare(move.start) + V.CoordsToSquare(move.end);
+ }
+
};