chess-system-java icon indicating copy to clipboard operation
chess-system-java copied to clipboard

FIX: promotion bug - undesired check

Open dfeprado opened this issue 1 year ago • 0 comments

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: Screenshot from 2024-08-15 21-27-45

After promoting the White H7 Pawn to a White H8 Bishop, the blacks would end in check: Screenshot from 2024-08-15 21-28-09

But that's a bug! The White Bishop cannot check the Black King on that situation.

This commit fix this bug.

dfeprado avatar Aug 16 '24 00:08 dfeprado