aboutsummaryrefslogtreecommitdiff
path: root/src/maze.h
blob: 8c66ff75e80ffc1ba9a07e08745e39d0a3b5de6e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#ifndef MAZE_H
#define MAZE_H

#include "position_stack.h"

typedef struct Dimensions
{
	int width;
	int height;
} Dimensions;

typedef struct Maze
{
	char ***grid;
	Dimensions dimens;
	Dimensions full_dimens;
} Maze;

Maze maze_create(Dimensions dimens, char *wall);

void maze_destroy(Maze *maze);

/**
 * Excavates a maze.
 *
 * This is what creates the actual maze.
 *
 * @param maze The maze to excavate
 * @param start_pos Start position
 */
void maze_excavate(Maze *maze, Position start_pos);

void maze_print(Maze maze);

#endif