(self, node)
Set the node this node was reached from.
Set the node this node was reached from.
Set the node this node was reached from .
def set_came_from(self, node):
        """Set the node this node was reached from."""
        self.came_from = node

        if node.came_by_motion == self.came_by_motion:
            self.came_by_motion_repetitions = node.came_by_motion_repetitions + 1
        else:
            self.came_by_motion_repetitions = 1
def set_came_from ( self , node ) : self . came_from = node if node . came_by_motion == self . came_by_motion : self . came_by_motion_repetitions = node . came_by_motion_repetitions + 1 else : self . came_by_motion_repetitions = 1