every type of graph currently has its own creation method in both window (to handle user input) and graph (to hand graph creation over to networkx)
instead create graph_factory.py with a graph factory that combines both of these methods into a single one (this means that GraphFactory should work with both networkx and tkinter). also make the graph factory a singleton and give it as variable to window so that it can be called in Window.create_menu() with self.graph_factory.new_complete_graph
code example:
new_graph_menu.add_command(label="Complete Graph", command=self.graph_factory.new_complete_graph)
instead of
new_graph_menu.add_command(label="Complete Graph", command=self.new_complete_graph)
every type of graph currently has its own creation method in both window (to handle user input) and graph (to hand graph creation over to networkx)
instead create graph_factory.py with a graph factory that combines both of these methods into a single one (this means that GraphFactory should work with both networkx and tkinter). also make the graph factory a singleton and give it as variable to window so that it can be called in
Window.create_menu()withself.graph_factory.new_complete_graphcode example:
instead of