projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Some thoughts on Chakart + fix Hiddenqueen moves notation + better moveslist display
[vchess.git]
/
client
/
src
/
variants
/
Teleport.js
diff --git
a/client/src/variants/Teleport.js
b/client/src/variants/Teleport.js
index
b4e6d7f
..
2379692
100644
(file)
--- 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 {
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;
setOtherVariables(fen) {
super.setOtherVariables(fen);
this.subTurn = 1;