return V.CanFlip;
}
+ static get IMAGE_EXTENSION() {
+ // All pieces should be in the SVG format
+ return ".svg";
+ }
+
// Turn "wb" into "B" (for FEN)
static board2fen(b) {
return b[0] == "w" ? b[1].toUpperCase() : b[1];
// On which squares is color under check ? (for interface)
getCheckSquares(color) {
- return this.isAttacked(this.kingPos[color], [V.GetOppCol(color)])
- ? [JSON.parse(JSON.stringify(this.kingPos[color]))] //need to duplicate!
- : [];
+ return (
+ this.underCheck(color)
+ ? [JSON.parse(JSON.stringify(this.kingPos[color]))] //need to duplicate!
+ : []
+ );
}
/////////////