import { ChessRules } from "@/base_rules";
export class MonochromeRules extends ChessRules {
+
static get HasEnpassant() {
// Pawns would be on the same side
return false;
return true;
}
+ getPpath(b) {
+ return (b[1] == V.KNIGHT ? "Enpassant/" : "") + b;
+ }
+
canIplay(side, [x, y]) {
const xBounds = side == 'w' ? [4,7] : [0,3];
return this.turn == side && x >= xBounds[0] && x <= xBounds[1];
static GenRandInitFen(randomness) {
// Remove the en-passant + castle part of the FEN
let fen = ChessRules.GenRandInitFen(randomness).slice(0, -6);
+ // Replace kings with queens
+ fen = fen.replace("k", "q").replace("K", "Q");
// Move pawns up:
fen = fen.replace("pppppppp/8","8/pppppppp")
.replace("8/PPPPPPPP","PPPPPPPP/8");
}
return notation;
}
+
};