X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=modelchecker%2Fsokoban.h;h=6b8823dd7cba10b304f678025af34aada1a16398;hb=03c6e2f515f6516448ec39aa40a439b9fc20c4c8;hp=50e9893d5fefee9daadc1f6a0a16ec737808e10e;hpb=3fc66581b10fbfc3f9abeba0ffc6fa8d0a099b24;p=mc1516pa.git diff --git a/modelchecker/sokoban.h b/modelchecker/sokoban.h index 50e9893..6b8823d 100644 --- a/modelchecker/sokoban.h +++ b/modelchecker/sokoban.h @@ -1,15 +1,28 @@ #ifndef SOKOBAN_H #define SOKOBAN_H +#include + +#include "uthash.h" typedef enum {FREE, WALL, BOX, TARGET, AGENT, TARGAGENT, TARGBOX} sokoban_tile; -struct sokoban_screen { +typedef struct { int x; int y; +} record_key; + +typedef struct { + record_key coord; sokoban_tile tile; - struct sokoban_screen *next; -}; + UT_hash_handle hh; +} sokoban_screen; + +sokoban_screen *parse_screen(FILE *stream); + +sokoban_screen *get_coord(int x, int y, sokoban_screen *screen); + +void sokoban_print(sokoban_screen *screen); -struct sokoban_screen *parse_screen(FILE *stream); +void sokoban_free(sokoban_screen *screen); #endif