nkarve / surge

A fast bitboard-based chess move generator in C++
MIT License
63 stars 15 forks source link

fix move generation bug #18

Open Heiaha opened 2 years ago

Heiaha commented 2 years ago

Hi,

I believe the current move generation has a bug in the following type of position:

5n2/3KP3/8/8/4k3/8/8/8 w - - 0 1

If a king is checked by a knight which can be captured by a pawn to promote, the current move generation will not recognize the potential for promotion. This pull request should fix the problem.

nkarve commented 2 years ago

Hi, thanks for the bug fix! I'll take a look at this and get back to you in a couple of days.