diff options
Diffstat (limited to 'map.h')
| -rw-r--r-- | map.h | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -26,10 +26,14 @@ typedef MapTile** Map; // Returns an empty map of given size Map empty_map(size_t width, size_t height); +// Stores all the existing neighbours of pos in neighbour_array and returns their amount +unsigned int neighbours(Position neighbour_array[], Position pos, size_t width, size_t height, \ + char visited[height][width]); + // https://en.wikipedia.org/wiki/Maze_generation_algorithm#Randomized_depth-first_search // WARNING: width and height are not the width and height of the returned map! // TODO: formula for actual size -Map rbt_maze_map(size_t width, size_t height); +Map rbt_maze_map(size_t width, size_t height, unsigned int seed); // Draw the map. Bet you didn't expect that. void draw_map(Map map, int width, int height, Position player_pos); |
