diff options
Diffstat (limited to 'map.c')
| -rw-r--r-- | map.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -375,9 +375,12 @@ void draw_map(Map map, size_t width, size_t height, Position start, Position goa attroff(COLOR_PAIR(PATH_COLOR)); 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)); + } + + if (visited != NULL) { + attron(COLOR_PAIR(WALL_TEXT_COLOR)); + mvprintw(height + map_offset_y, map_offset_x, "Visited %zu cells", visited_count(visited, width, height)); attroff(COLOR_PAIR(WALL_TEXT_COLOR)); } |
