Closed JMSSVLC closed 2 years ago
At first glance I can't seem to find any problem.
The illegal move removal code is correctly "removing" e1e2 from the list (by placing it beyond a "empty" move). Any move after the first ("none") move is not applicable and it's done this way for performance reasons.
Let me know if there should be something I've missed.
I was watching your project and it occurs to me to find the legal moves for the position described for the following FEN "r3kb1r/p3pppp/p1n2n2/2pp1Q2/3P1B2/2P1PN2/Pq3PPP/RN2K2R w KQkq - 0 9" so that I could understand the "magic" of the "Magic Bitboards" and I found that in the following snippet
Among the legal moves there is a short-castling, but it seems that the internal data are different because of the == operator in the following function of MoveList class
using the debugger I found that left._data = 49415 and right._data = 49414, although both moves are recognized as "0-0"
the rest of moves are all OK with the == operator. I think te problem is with castling
but I don't understand your code enough to find what is wrong. Maybe I am the one who makes something wrong
I hope it helps you. It is a very interesting project