blob: 8e5f28ec9bcb1b4281fc2af64b0b23ebbd6a8bfa (
plain) (
blame)
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
|
#ifndef STRUCTS_H_
#define STRUCTS_H_
#include <stddef.h>
struct Position_s {
size_t x;
size_t y;
};
typedef struct Position_s Position;
enum MapTile_e {
EMPTY = 0,
WALL,
};
typedef enum MapTile_e MapTile;
enum Colors_e {
EMPTY_COLOR = 1,
GOAL_COLOR = 2,
WALL_COLOR = 3,
START_COLOR = 4,
PATH_COLOR = 5,
};
/* A map is a 2D array of MapTiles.
* Use as map[row][column] */
typedef MapTile** Map;
struct PathNode_s {
Position parent;
};
typedef struct PathNode_s PathNode;
typedef PathNode** Path;
#endif /* STRUCTS_H_ */
|