diff options
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -5,6 +5,7 @@ #include <time.h> #include "map.h" #include "structs.h" +#include "config.h" /* So, TODO for now: - Implement Dijkstra and greedy-best-first search algorithms @@ -38,10 +39,13 @@ int main(void) { noecho(); /* Don't echo characters */ initialize_colors(); - Map map = rbt_maze_map(20, 10, (unsigned int) time(NULL)); + /* FIXME: shitty. sometimes leaves enough space on the right for a bigger map */ + size_t height = LINES/2 - DRAW_MAP_OFFSET_Y, + width = COLS/4 - 1; + Map map = rbt_maze_map(width, height, (unsigned int) time(NULL)); Position fake_start_position_to_pass_into_draw_map = {0, 0}; - Position fake_goal_position_to_pass_into_draw_map = {20*2-2, 10*2-2}; - draw_map(map, 20*2-1, 10*2-1, fake_start_position_to_pass_into_draw_map, fake_goal_position_to_pass_into_draw_map); + Position fake_goal_position_to_pass_into_draw_map = {width*2-2, height*2-2}; + draw_map(map, width*2-1, height*2-1, fake_start_position_to_pass_into_draw_map, fake_goal_position_to_pass_into_draw_map); getch(); endwin(); |
