Skip to content

isCheck incorrectly detects castling #35

@PathToLife

Description

@PathToLife

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;
    });

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions