You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The cheapest and most straightforward way to detect checks is to consider the previous move just made by the opponent. It might be a direct check or discovered check, so one has to test whether piece on target square attacks the king, or whether piece on origin square is attacked by an own sliding piece on an otherwise open ray in opponent king direction [2]. If the last move was an en passant capture, one has to consider a few more complicated cases of possible discovered checks, since the captured pawn is not on the target square, and two pawns disappear from the 4th (5th) rank.
https://www.chessprogramming.org/Check
Currently a lot of time is spent on
isInCheck
The text was updated successfully, but these errors were encountered: