chess-system-java
chess-system-java copied to clipboard
FIX: promotion bug - undesired check
If a black king is sitting on row 8 and a paw is promoted to a bishop, and there's no piece between these two, the unfixed code would evaluate to a check situation. The following images show this
Initially, we have this situation:
After promoting the White H7 Pawn to a White H8 Bishop, the blacks would end in check:
But that's a bug! The White Bishop cannot check the Black King on that situation.
This commit fix this bug.