}
getEpSquare(moveOrSquare) {
- if (typeof moveOrSquare !== "object" || move.appear[0].c != 'c')
+ if (typeof moveOrSquare !== "object" || moveOrSquare.appear[0].c != 'c')
return super.getEpSquare(moveOrSquare);
// Checkered move: no en-passant
return undefined;
const oppCol = V.GetOppCol(this.turn);
for (let i = 0; i < V.size.x; i++) {
for (let j = 0; j < V.size.y; j++) {
- // NOTE: just testing == color isn't enough because of checkred pieces
+ // NOTE: just testing == color isn't enough because of checkered pieces
if (this.board[i][j] != V.EMPTY && this.getColor(i, j) != oppCol) {
const moves = this.getPotentialMovesFrom([i, j]);
if (moves.length > 0) {
super.undo(move);
}
+ static get SEARCH_DEPTH() {
+ return 2;
+ }
+
getNotation(move) {
if (move.appear.length == 2) {
// Castle