diff options
| -rw-r--r-- | main.c | 1 | ||||
| -rw-r--r-- | map.h | 2 | ||||
| -rw-r--r-- | priority_queue.c | 3 |
3 files changed, 1 insertions, 5 deletions
@@ -147,7 +147,6 @@ int main(int argc, char **argv) { draw_map(map, width, height, offset_x, offset_y, start_pos, end_pos, NULL, path, visited, NULL); char c = getch(); switch (c) { - /* FIXME: scroll the view not the content or whatever */ case 'h': offset_x += 2; break; case 'l': offset_x -= 2; break; case 'j': offset_y -= 1; break; @@ -20,7 +20,7 @@ unsigned int neighbours_8dir(Position neighbour_array[8], size_t cost_array[8], /* 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 */ + * The actual size for a given dimention is (dimension * 2 - 1) */ Map rbt_maze_map(size_t width, size_t height, unsigned int seed); /* Reads the map from a file, saves size in `width` and `height` diff --git a/priority_queue.c b/priority_queue.c index c90f661..7e706a8 100644 --- a/priority_queue.c +++ b/priority_queue.c @@ -11,9 +11,6 @@ PositionPQ *ppq_new(Position pos, size_t priority) { return ppq; } -/* TODO: we need to handle if a pos is already in ppq, but this time we have it with better priority. - * I think we need to implement ppq_remove(*ppq, pos), which'll see if pos is in ppq and will remove it. - * Then we call it where we return PPQ_INSERT_SUCCESS, but before we actually insert the pos. */ int ppq_insert(PositionPQ **ppq, Position pos, size_t priority) { //printf("Inserting %zu %zu\n", pos.x, pos.y); PositionPQ *start = *ppq; |
