#include "../common/try_malloc.h" /* try_malloc() */
#include "../common/yx_uint8.h" /* struct yx_uint8 */
#include "rrand.h" /* rrand() */
+#include "yx_uint8.h" /* mv_yx_in_dir_wrap() */
#include "world.h" /* global world */
}
return passable;
}
+
+
+
+extern uint8_t mv_yx_in_dir_legal(char dir, struct yx_uint8 * yx)
+{
+ uint8_t wraptest = mv_yx_in_dir_wrap(dir, yx, 0);
+ if (!wraptest && yx->x < world.map.length && yx->y < world.map.length)
+ {
+ return 1;
+ }
+ return 0;
+}