Skip to content

Setting en passant square via Position::set doesn't work #17

@redbullmarky

Description

@redbullmarky

Given the following snippet of test code:

Position p;
Position::set("rnbqkbnr/ppppppp1/8/8/5NPp/8/PPPPPP1P/RNBQKB1R b KQkq g3 0 3", p);

When I output p.fen() it does not respond with the enpassant square & counters.
Looking into the surge code, the problem appears to be that Position::set doesn't deal with anything past the castling flags.

I've been using the library to validate moves in my own code, but not being able to set the enpassant means that it reports one less available move than should be possible.

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