-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstruct.h
More file actions
41 lines (34 loc) · 745 Bytes
/
Copy pathstruct.h
File metadata and controls
41 lines (34 loc) · 745 Bytes
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
36
37
38
39
40
41
//
// Created by thgir on 11/02/2021.
//
#ifndef MAZE_GENERATOR_STRUCT_H
#define MAZE_GENERATOR_STRUCT_H
#include <stdbool.h>
#define LINE 50
#define COLUMN 50
typedef enum {
TOP, RIGHT, BOTTOM, LEFT
} boxWall_e;
typedef struct{
bool isWallSolid[4];
bool hasBeenVisited;
} box_t;
typedef struct {
box_t box[LINE][COLUMN];
} maze_t;
typedef struct {
bool isBoxEmpty[4];
int nbrOfEmptyBoxes;
} freeBox_t;
typedef struct boxInStack_t boxInStack_t;
struct boxInStack_t{
box_t * box;
boxInStack_t * previous;
int position[2];
};
typedef struct {
int position[2];
int distanceFromEntrance;
boxWall_e exitWall;
}exitBox_t;
#endif //MAZE_GENERATOR_STRUCT_H