From c6db3a75f756d790ede966c34adc3dbc793803d1 Mon Sep 17 00:00:00 2001 From: Kirill Petrashin Date: Wed, 15 Apr 2026 18:13:42 +0300 Subject: Try to implement costs, fail --- map.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'map.h') diff --git a/map.h b/map.h index 978db21..93672b7 100644 --- a/map.h +++ b/map.h @@ -48,6 +48,14 @@ Map rbt_maze_map(size_t width, size_t height, unsigned int seed); Map file_plaintext_map(char *filename, size_t *width, size_t *height, Position *start_pos, Position *end_pos); /* The reverse of above */ void map_to_file_plaintext(char *filename, Map map, size_t width, size_t height, Position start, Position end); +/* Loads integer costs from a file. Sizes have to match. + * File format: + * 5x4 + * 10 20 30 40 5 + * 20 49 5 3 2 + * 1 2 4 5 2 + * 5 1 95 2 5 */ +size_t **file_plaintext_costs(char *filename, size_t width, size_t height); /* Draw the map. Bet you didn't expect that. * path could be NULL to draw a map with no path. So can cursor, frontier and visited */ -- cgit v1.2.3