diff options
Diffstat (limited to 'src/maze.h')
| -rw-r--r-- | src/maze.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/maze.h b/src/maze.h new file mode 100644 index 0000000..5b3581a --- /dev/null +++ b/src/maze.h @@ -0,0 +1,32 @@ +#ifndef MAZE_H +#define MAZE_H + +struct point +{ + int x; + int y; +}; + +struct maze +{ + int width; + int height; + int **map; + struct point starting_point; + struct point end_point; +}; + +static inline struct point relative_point(struct point point, int x, int y) +{ + struct point new_point; + new_point.x = point.x + x; + new_point.y = point.y + y; + return new_point; +} + +static inline int is_valid_maze_size(int size) +{ + return size > 2 && size % 2 != 0; +} + +#endif
\ No newline at end of file |
