-
- Downloads
lab3: Make UI less restrictive
In general remove some early aborts in the UI to allow the user to do
stupid things if it wants to, in order to make it easier for the
students to test their functions.
Specifically, remove early return in display_graph() so that it still
runs the functions adjacency_matrix, get_node_cardinality and
get_edge_cardinality.
Additionally, change so that want in get_node only gives a warning in
case the provided node does/doesn't exist instead of reporting an
error. This for example makes it possible to try and add nodes that
already exist or delete nodes that don't exist. It also makes it
possible to try and run Dijkstra or Prim with a start-node that
doesn't exist (which is not something the tests try).
Also fix a minor bug in the UI:s prim function where it would attempt
to call the non-existing method error (instead of display_error) in
case the program is run in directed mode. This resulted in the program
crashing rather than writing an error message if prim was run in
directed mode.
Signed-off-by:
Simon Sundberg <simon.sundberg@kau.se>
Loading
Please register or sign in to comment