repositories
/
mc1516pa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2f85455
)
check space helper added
author
Alexander Fedotov
<soyaxhoya@gmail.com>
Mon, 11 Apr 2016 12:06:35 +0000
(13:06 +0100)
committer
Alexander Fedotov
<soyaxhoya@gmail.com>
Mon, 11 Apr 2016 12:06:35 +0000
(13:06 +0100)
modelchecker/coord.c
patch
|
blob
|
history
diff --git
a/modelchecker/coord.c
b/modelchecker/coord.c
index
be9d36d
..
f5774a6
100644
(file)
--- a/
modelchecker/coord.c
+++ b/
modelchecker/coord.c
@@
-164,6
+164,17
@@
int check_xy_exists(int x, int y, bimap *bm)
return res;
}
+int check_space(int x, int y, direction d, int delta, bimap *bm)
+{
+ switch(d){
+ case LEFT: x = x - delta; break;
+ case UP: y = y - delta; break;
+ case RIGHT: x = x + delta; break;
+ case DOWN: y = y + delta; break;
+ }
+ return check_xy_exists(x, y, bm);
+}
+
/*
* Each coordinate has three related boolean variables. The combination of those boolean variables
* defines tiles: