#ifndef STRUCTS_H_ #define STRUCTS_H_ #include /* Top-left corner is x = 0, y = 0 */ struct Position_s { size_t x; size_t y; }; typedef struct Position_s Position; enum MapTile_e { EMPTY = 0, WALL = 255, }; typedef enum MapTile_e MapTile; enum Colors_e { EMPTY_COLOR = 1, VISITED_COLOR = 2, GOAL_COLOR = 3, WALL_COLOR = 4, START_COLOR = 5, PATH_COLOR = 6, FRONTIER_COLOR = 7, CURSOR_COLOR = 8, /* Used in path.c/anim() */ WALL_TEXT_COLOR = 9, }; /* A map is a 2D array of MapTiles. * Use as map[row][column] */ typedef MapTile** Map; /* A path is a 2D array, in which for every tile we store the Position of a * tile we came from. To get the full path you have to follow it from end * to start */ typedef Position** Path; #endif /* STRUCTS_H_ */