projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Simplify Grand Chess
[vchess.git]
/
client
/
src
/
variants
/
Yote.js
diff --git
a/client/src/variants/Yote.js
b/client/src/variants/Yote.js
index
76d7c2e
..
4e53fe9
100644
(file)
--- a/
client/src/variants/Yote.js
+++ b/
client/src/variants/Yote.js
@@
-167,8
+167,8
@@
export class YoteRules extends ChessRules {
return (x < V.size.x && this.getColor(x, y) != side);
}
return (x < V.size.x && this.getColor(x, y) != side);
}
- // TODO: hoverHighlight() would well take an arg "side"...
- hoverHighlight(x, y) {
+ hoverHighlight([x, y], side) {
+ if (!!side && side != this.turn) return false;
const L = this.captures.length;
if (!this.captures[L-1]) return false;
const oppCol = V.GetOppCol(this.turn);
const L = this.captures.length;
if (!this.captures[L-1]) return false;
const oppCol = V.GetOppCol(this.turn);
@@
-242,7
+242,7
@@
export class YoteRules extends ChessRules {
const mv = this.doClick([x, y]);
return (!!mv ? [mv] : []);
}
const mv = this.doClick([x, y]);
return (!!mv ? [mv] : []);
}
- if (x >= V.size.x) return this.getReserveMoves(
[x, y]
);
+ if (x >= V.size.x) return this.getReserveMoves(
x
);
return this.getPotentialPawnMoves([x, y]);
}
return this.getPotentialPawnMoves([x, y]);
}