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