(self)
Run the pathfinder, then send the result back to the client.
Run the pathfinder, then send the result back to the client.
Run the pathfinder then send the result back to the client .
def pathfind(self):
        """Run the pathfinder, then send the result back to the client."""
        dijkstra = Dijkstra(
            self.start_view, self.target_view, self.min_line, self.max_line
        )
        motions = dijkstra.find_path(self.client_connection)

        # If motions is None, that means we cancelled pathfinding because a new
        # request was received. We also check for another request now in case one was
        # sent during the last iteration of the pathfinding loop.
        if not (motions is None or self.client_connection.poll()):
            self.client_connection.send(("RESULT", motions))
def pathfind ( self ) : dijkstra = Dijkstra ( self . start_view , self . target_view , self . min_line , self . max_line ) motions = dijkstra . find_path ( self . client_connection ) # If motions is None, that means we cancelled pathfinding because a new # request was received. We also check for another request now in case one was # sent during the last iteration of the pathfinding loop. if not ( motions is None or self . client_connection . poll ( ) ) : self . client_connection . send ( ( "RESULT" , motions ) )