import { randInt } from "@/utils/alea";
export class TeleportRules extends ChessRules {
+
hoverHighlight(x, y) {
// Testing move validity results in an infinite update loop.
// TODO: find a way to test validity anyway.
return this.subTurn == 1;
}
+ canIplay(side, [x, y]) {
+ if (this.subTurn == 2) return (this.board[x][y] == V.EMPTY);
+ return super.canIplay(side, [x, y]);
+ }
+
getPPpath(m) {
if (
m.vanish.length == 2 &&
move.appear[0].p != V.PAWN ? move.appear[0].p.toUpperCase() : "";
return piece + "@" + V.CoordsToSquare(move.end);
}
+
};