// NOTE: initial setup differs from the original; see
// https://www.chessvariants.com/large.dir/freeling.html
export const VariantRules = class GrandRules extends ChessRules {
- static getPpath(b) {
- return ([V.MARSHALL, V.CARDINAL].includes(b[1]) ? "Grand/" : "") + b;
- }
-
static IsGoodFen(fen) {
if (!ChessRules.IsGoodFen(fen)) return false;
const fenParsed = V.ParseFen(fen);
return Object.assign(ChessRules.ParseFen(fen), { captured: fenParts[5] });
}
+ getPpath(b) {
+ return ([V.MARSHALL, V.CARDINAL].includes(b[1]) ? "Grand/" : "") + b;
+ }
+
getFen() {
return super.getFen() + " " + this.getCapturedFen();
}