Returns if the current side to move is in check.

def is_check(self) -> bool:
        """Returns if the current side to move is in check."""
        king = self.king(self.turn)
        return king is not None and self.is_attacked_by(not self.turn, king)