-
-
Notifications
You must be signed in to change notification settings - Fork 556
Open
Labels
Description
def was_into_check(self) -> bool:
king = self.king(not self.turn)
return king is not None and self.is_attacked_by(self.turn, king)
Here it only picks one king.... but if the position loaded has multiple kings, it only return the bool of one king which depends on FEN parsing order, that means - a flipped position can bring different king of the corresponding side to move.
While it isn't too much - this is kind of UB for pseudo-legal FENs, and it affects Board.is_valid, Board.status and possibly its variants.