diff options
| author | Kirill Petrashin <kirill8201@yandex.ru> | 2026-04-22 20:48:27 +0300 |
|---|---|---|
| committer | Kirill Petrashin <kirill8201@yandex.ru> | 2026-04-22 20:48:27 +0300 |
| commit | 55b10d144a6855791f3918f37ccdf36fd8109e58 (patch) | |
| tree | 788897d35fe3eec8751a3fd4c3958941126d8709 /main.c | |
| parent | 1cd0a30593d9b7805752e3e183c93f622211ed0b (diff) | |
| download | astar-55b10d144a6855791f3918f37ccdf36fd8109e58.tar.xz | |
Add a path_reverse() function
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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': |
