Closed mattbruv closed 6 years ago
Clearly, the null_move() function is not updating the board state well enough to do proper legality checks. Let me look into this over the weekend and confirm and fix this issue.
Sounds good. Thanks a lot for making this library. It takes out so much of the heavy work that goes into making a chess engine and it has been a pleasure to use in my project so far.
No problem. Thanks for using the library. The stated goal of this project is to prevent every chess engine developer from writing their own move generator (I've been there myself.) I'm happy to take the burden off of other people in a useful way.
Sorry for forgetting about this one. The patch looks good, I tested it as well. It is merged and version 0.4.2 is released.
The Board.legal() function fails at recognizing legal moves/pins after Board.null_move() is called. Take the following example position. The positions start exactly the same way except for the side to move. In the white example, it considers Ra2 illegal as it should. However in the exact same position, with white to move (after a null move from black), it considers Ra2 legal.