getAllValidMoves() {
const moves = super.getAllValidMoves();
- if (moves.some(m => m.vanish.length == 2)) return V.KeepCaptures(moves);
+ if (moves.some(m => m.vanish.length == 2 && m.appear.length == 1))
+ return V.KeepCaptures(moves);
return moves;
}
this.castleFlags[c] = [V.size.y, V.size.y];
return;
}
- super.updateCastleFlags(move);
+ super.updateCastleFlags(move, piece);
}
postUndo(move) {