export class TeleportRules extends ChessRules {
hoverHighlight(x, y) {
- // TODO: only highlight if the move is legal
+ // Testing move validity results in an infinite update loop.
+ // TODO: find a way to test validity anyway.
return (this.subTurn == 2 && this.board[x][y] == V.EMPTY);
}
(color == 'w' && mvEval > m.eval) ||
(color == 'b' && mvEval < m.eval)
) {
- // TODO: if many second moves have the same eval, only the
- // first is kept. Could be randomized.
m.eval = mvEval;
m.next = m2;
}