import { randInt, shuffle } from "@/utils/alea";
export class RoyalraceRules extends ChessRules {
- static get HasFlags() {
- return false;
- }
- static get HasCastle() {
+ static get HasFlags() {
return false;
}
return { x: 11, y: 11 };
}
+ getPpath(b) {
+ return (b[1] == V.KNIGHT ? "Enpassant/" : "") + b;
+ }
+
static GenRandInitFen(randomness) {
if (randomness == 0)
- return "11/11/11/11/11/11/11/11/11/qrbnp1PNBRQ/krbnp1PNBRK w 0";
+ return "92/92/92/92/92/92/92/92/92/qrbnp1PNBRQ/krbnp1PNBRK w 0";
let pieces = { w: new Array(10), b: new Array(10) };
// Shuffle pieces on first and second rank
const whiteFen = pieces["w"].join("").toUpperCase();
const blackFen = pieces["b"].join("");
return (
- "11/11/11/11/11/11/11/11/11/" +
+ "92/92/92/92/92/92/92/92/92/" +
blackFen.substr(5).split("").reverse().join("") +
"1" +
whiteFen.substr(5).split("").join("") +
V.CoordsToSquare(move.end)
);
}
+
};