Closed malaschitz closed 1 year ago
I found a more accurate solution: https://github.com/alexobviously/bishop/commit/9ff23027c1ca62e213c0e0af38446c9bdb3c8328 Basically just moved the guard clause to check if the target square is the rook square before checking if it's attacked. Now it behaves as expected, and as a side effect (I think), a previously failing perft benchmark from early on is now working.
For quick future reference: https://lichess.org/analysis/chess960/rk2r2b/ppp2b1p/1n4p1/3p1p2/3q1P2/1P1QN3/P1P1P2P/RK2R1BB_w_EAea_-_0_12 - this is the expected behaviour (and what we currently have)
Output:
In this position White should be allowed a big castle - move b1a1. In this move the king moves from b1 to c1. But castling is not among the legal moves.