add safety switch for parsing, fixed agent error
[mc1516pa.git] / modelchecker / sokoban.h
1 #ifndef SOKOBAN_H
2 #define SOKOBAN_H
3 #include <stdio.h>
4 #include <stdbool.h>
5
6 #include "uthash.h"
7
8 typedef enum {FREE, WALL, BOX, TARGET, AGENT, TARGAGENT, TARGBOX} sokoban_tile;
9
10 typedef struct {
11 int x;
12 int y;
13 } record_key;
14
15 typedef struct {
16 record_key coord;
17 sokoban_tile tile;
18 UT_hash_handle hh;
19 } sokoban_screen;
20
21 sokoban_screen *parse_screen(FILE *stream, bool safe);
22
23 sokoban_screen *get_coord(int x, int y, sokoban_screen *screen);
24
25 void sokoban_print(sokoban_screen *screen);
26
27 void sokoban_free(sokoban_screen *screen);
28
29 #endif