Don't allow king to castle through or out of check#17
Don't allow king to castle through or out of check#17CompuGeniusCode wants to merge 1 commit intoemymin:mainfrom
Conversation
|
Thank you for the contribution! rnb1kbnr/ppp3p1/8/7p/8/8/PPPPqPPP/RNB1K2R w KQkq - 0 1 1nbqkbnr/1ppppppp/8/p6Q/4r3/N6N/PPPP1PPP/R1B1K2R w KQka - 0 1 |
|
Were these bugs not there before my edit? I definitely remember coming across an issue where a king couldn't kill a queen that was attacking it. |
|
It's possible there might be similar issues like that, the move generation really needs some proper automated testing. However in the positions I mentioned, the current version behaves correctly (with the exception of also including castling as a valid move of course). |
|
Hmm. I'll keep trying. I haven't looked yet - is there a way to start the board in a certain FEN besides standard starting pos for faster testing? I'm not up for creating automated testing rn, but st least that would make it faster. |
|
The Board has a method to load FEN strings which it uses to lay out the board when starting a game, that part is also fairly untested but I think loading mid-game positions should be fine! |
No description provided.