Skip to content

Missed pawn promotions in move generation algorithm #27

@chrizator

Description

@chrizator

When the only checker is a knight on the 8th or 1st rank respectively, pawn captures are not considered promotions. You end up with a pawn on the 8th or 1st rank.

case make_piece(Them, KNIGHT):
    //If the checker is either a pawn or a knight, the only legal moves are to capture
    //the checker. Only non-pinned pieces can capture it
    b1 = attackers_from<Us>(checker_square, all) & not_pinned;
    while (b1) *list++ = Move(pop_lsb(&b1), checker_square, CAPTURE);

    return list;

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