parsing rewritten, using hashes now
[mc1516pa.git] / modelchecker / sokoban.h
index e69de29..414daa0 100644 (file)
@@ -0,0 +1,26 @@
+#ifndef SOKOBAN_H
+#define SOKOBAN_H
+#include "uthash.h"
+
+typedef enum {FREE, WALL, BOX, TARGET, AGENT, TARGAGENT, TARGBOX} sokoban_tile;
+
+typedef struct {
+       int x;
+       int y;
+} record_key;
+
+typedef struct {
+       record_key coord;
+       sokoban_tile tile;
+       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);
+
+void sokoban_clear(sokoban_screen *screen);
+
+#endif