+ res = this.isAttacked(this.kingPos[c], [oppCol]);
+ this.undo(move);
+ return res;
+ }
+
+ getCheckSquares(move)
+ {
+ const c = this.getOppCol(this.turn);
+ // King might explode:
+ const saveKingPos = JSON.parse(JSON.stringify(this.kingPos[c]));
+ this.play(move);
+ let res = [ ];
+ if (this.kingPos[c][0] < 0)
+ res = [saveKingPos];
+ else if (this.isAttacked(this.kingPos[c], [this.getOppCol(c)]))
+ res = [ JSON.parse(JSON.stringify(this.kingPos[c])) ]