aboutsummaryrefslogtreecommitdiff
path: root/structs.h
diff options
context:
space:
mode:
authorKirill Petrashin <kirill8201@yandex.ru>2026-03-21 15:31:53 +0300
committerKirill Petrashin <kirill8201@yandex.ru>2026-03-21 15:31:53 +0300
commit596eeed9dd378a8994778e03319b538206672bec (patch)
tree81ea2152c06cfea43aecee0d9eb320f168dd4342 /structs.h
parent5f73b16c1e80ef40e3cb95aef36d8fe964970565 (diff)
Implement breadth-first-search + fix the priority queue + some other stuff
Diffstat (limited to 'structs.h')
-rw-r--r--structs.h26
1 files changed, 25 insertions, 1 deletions
diff --git a/structs.h b/structs.h
index 5221829..8e5f28e 100644
--- a/structs.h
+++ b/structs.h
@@ -7,7 +7,31 @@ 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_ */