|
var attackFilter = (move: Move) => move.to.file === kingSquare.file && move.to.rank === kingSquare.rank; |
fix on my branch is:
boardState.moves.filter((move) => {
if (move.isWhite === checkWhite) return false;
return kingSquare && move.to.file === kingSquare.file && move.to.rank === kingSquare.rank;
});
node-chess/src/engine/instances/classic/rules.ts
Line 88 in 7bb8796
fix on my branch is: