Skip to content

Pseudo-legal moves for non-Pawn pieces does not account for blocking pieces #12

@corbin-phipps

Description

@corbin-phipps

Currently, pseudo-legal moves are generated by looking at the pre-computed possible moves from a square and checking if the target squares are occupied or not. This does not account for pieces in between the current square and the target square.

For example, in the starting board position, the White Rook on A1 cannot move along the A-File because there is a Pawn on A2. However, the current generated pseudo-legal moves will allow the Rook to move to A3, A4, etc. since those squares aren't occupied, even though there is the Pawn on A2 blocking the Rook's path.

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