def update(self, nodes: tuple[(Node, Node, list[Node])]):
    '\n        Updates the plot with a tuple of nodes (forward, backward, shortest_path)\n        '
    (f, b, s) = nodes
    if (not s):
        self._colors[f.id] = 1
        self._colors[b.id] = 2
        self.ax.scatter.set_array(self._colors)
        return (self.ax.scatter,)
    else:
        x = [n.x for n in s]
        y = [n.y for n in s]
        if self.i:
            c = 'green'
        else:
            c = 'orange'
        ap = self.ax.plot(x, y, color=c, linewidth=2)
        self.i = (not self.i)
        return ap
Updates the plot with a tuple of nodes (forward, backward, shortest_path)
def update(self, nodes: tuple[(Node, Node, list[Node])]):
    '\n        \n        '
    (f, b, s) = nodes
    if (not s):
        self._colors[f.id] = 1
        self._colors[b.id] = 2
        self.ax.scatter.set_array(self._colors)
        return (self.ax.scatter,)
    else:
        x = [n.x for n in s]
        y = [n.y for n in s]
        if self.i:
            c = 'green'
        else:
            c = 'orange'
        ap = self.ax.plot(x, y, color=c, linewidth=2)
        self.i = (not self.i)
        return ap