X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=modelchecker%2Fsokoban.h;h=414daa0c3d43cf1c739f2725e45c7c556e6f214f;hb=476b70d5c7cb978fec97c99fe462402eb38405de;hp=50e9893d5fefee9daadc1f6a0a16ec737808e10e;hpb=3fc66581b10fbfc3f9abeba0ffc6fa8d0a099b24;p=mc1516pa.git diff --git a/modelchecker/sokoban.h b/modelchecker/sokoban.h index 50e9893..414daa0 100644 --- a/modelchecker/sokoban.h +++ b/modelchecker/sokoban.h @@ -1,15 +1,26 @@ #ifndef SOKOBAN_H #define SOKOBAN_H +#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_clear(sokoban_screen *screen); #endif