Skip to content

combine all graph creation methods into a factory #13

@cytobi

Description

@cytobi

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    code qualityimprove the code quality in some way

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions