<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def was_into_check(self) -> bool: """ Checks if the king of the other side is attacked. Such a position is not valid and could only be reached by an illegal move. """

        king = self.king(not self.turn)
        return king is not None and self.is_attacked_by(self.turn, king)