From 5033a3054d26212a57c0cf62007708ff5fb4ecc3 Mon Sep 17 00:00:00 2001 From: Kirill Petrashin Date: Tue, 14 Apr 2026 18:39:27 +0300 Subject: Print info in walls --- map.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'map.c') diff --git a/map.c b/map.c index 035623a..544164e 100644 --- a/map.c +++ b/map.c @@ -373,7 +373,12 @@ void draw_map(Map map, size_t width, size_t height, Position start, Position goa cur = path[cur.y][cur.x].parent; } attroff(COLOR_PAIR(PATH_COLOR)); - /* FIXME: print this as part of bottom wall? set_message("Path cost: %zu", length); */ + attron(COLOR_PAIR(WALL_TEXT_COLOR)); + mvprintw(map_offset_y - 1, map_offset_x, "Path cost: %zu", length); + if (visited != NULL) { + mvprintw(height + map_offset_y, map_offset_x, "Visited %zu cells", visited_count(visited, width, height)); + } + attroff(COLOR_PAIR(WALL_TEXT_COLOR)); } /* Draw the start */ -- cgit v1.2.3