X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FTeleport.js;h=2379692a922ca2c4df2bf672a379664adacdf9b7;hp=b4e6d7faa5a575d2092e3ebd40ee138780b06793;hb=90df90bca1a993930a0e1a07a1b4990dd538c6e2;hpb=7a1d72724ca06099ac87f094e7216d29a05c7a3e diff --git a/client/src/variants/Teleport.js b/client/src/variants/Teleport.js index b4e6d7fa..2379692a 100644 --- a/client/src/variants/Teleport.js +++ b/client/src/variants/Teleport.js @@ -2,6 +2,11 @@ import { ChessRules, Move, PiPo } from "@/base_rules"; import { randInt } from "@/utils/alea"; export class TeleportRules extends ChessRules { + hoverHighlight(x, y) { + // TODO: only highlight if the move is legal + return (this.subTurn == 2 && this.board[x][y] == V.EMPTY); + } + setOtherVariables(fen) { super.setOtherVariables(fen); this.subTurn = 1;