From 55b10d144a6855791f3918f37ccdf36fd8109e58 Mon Sep 17 00:00:00 2001 From: Kirill Petrashin Date: Wed, 22 Apr 2026 20:48:27 +0300 Subject: Add a path_reverse() function --- main.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'main.c') diff --git a/main.c b/main.c index 4347551..93dfc1e 100644 --- a/main.c +++ b/main.c @@ -186,6 +186,8 @@ int main(int argc, char **argv) { * * [d] - Switch algorithms (A* or Dijsktra's) * + * [r] - Reverse the path and switch start/end around + * * [s] - Save the map to a bmp file * * [w] - Open a map from a plaintext file @@ -276,6 +278,10 @@ int main(int argc, char **argv) { /* TODO: print time */ break; + case 'r': + path_reverse(&path, width, height, &start_pos, &end_pos); + break; + case 'y': case 'o': case 'u': -- cgit v1.2.3