aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/main.c b/main.c
index 3120c3b..a83dadd 100644
--- a/main.c
+++ b/main.c
@@ -269,8 +269,9 @@ int main(int argc, char **argv) {
break;
case KEYBINDING_ALGO:
- if (path_func == astar_path) { set_message("Dijkstra's"); path_func = &dijkstra_path; }
- else { set_message("A*"); path_func = &astar_path; };
+ if (path_func == astar_path) { path_func_string = DIJKSTRA_STRING; path_func = &dijkstra_path; }
+ else { path_func_string = ASTAR_STRING; path_func = &astar_path; };
+ set_message("%s", path_func_string);
path_free(path, height);
path = path_func(dirs, map, cell_costs, width, height, start_pos, end_pos, visited, anim);
/* TODO: print time */
@@ -383,7 +384,7 @@ int main(int argc, char **argv) {
}
break;
case KEYBINDING_PATH_TIME:
- set_message("%f seconds", path_time); print_message(height);
+ set_message("%f seconds (%s)", path_time, path_func_string); print_message(height);
break;
case KEYBINDING_LOAD_COSTS: /* Load a cost file */