code: 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)
docs: 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.