import { randInt } from "@/utils/alea";
export class SwapRules extends ChessRules {
+
setOtherVariables(fen) {
super.setOtherVariables(fen);
// Local stack of swaps
}
getPPpath(m) {
- if (m.vanish.length == 1) return super.getPPpath(m);
+ if (m.appear.length == 1) return super.getPPpath(m);
// Swap promotion:
return m.appear[1].c + m.appear[1].p;
}
// Swap
return "S" + V.CoordsToSquare(move.start) + V.CoordsToSquare(move.end);
}
+
};