Some thoughts on Chakart + fix Hiddenqueen moves notation + better moveslist display
[vchess.git] / client / src / variants / Teleport.js
index b4e6d7f..2379692 100644 (file)
@@ -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;