From 977c46591583a59f8d51773ffaba08b5076a426e Mon Sep 17 00:00:00 2001 From: HampusM Date: Fri, 7 Jan 2022 12:56:37 +0100 Subject: style: fix minor code formatting issues --- src/maze.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/maze.c') diff --git a/src/maze.c b/src/maze.c index bae1ba4..5a59c76 100644 --- a/src/maze.c +++ b/src/maze.c @@ -1,10 +1,10 @@ #include "maze.h" #include "grid.h" #include "position.h" +#include #include #include #include -#include int is_pos_empty(Grid grid, Position pos) { @@ -15,10 +15,10 @@ void add_neighbour(Position neighbours[], uint8_t *neighbour_cnt, Position neigh { neighbours[*neighbour_cnt] = neighbour_pos; (*neighbour_cnt)++; - } -void get_neighbours(Grid grid, Position pos, Position neighbours[], uint8_t *neighbour_cnt) +void get_neighbours(Grid grid, Position pos, Position neighbours[], + uint8_t *neighbour_cnt) { if (pos.y != 1) { @@ -96,7 +96,7 @@ void grid_to_maze(Grid grid, Position start_pos) Position next_pos = neighbours[rand() % neighbour_cnt]; Position between_pos = position_create(pos.x, pos.y); - + if (next_pos.y != pos.y) between_pos.y += next_pos.y > pos.y ? 1 : -1; @@ -110,4 +110,3 @@ void grid_to_maze(Grid grid, Position start_pos) pos_stack_destroy(path); } - -- cgit v1.2.3-18-g5258