3 extern char yx_uint16_cmp (struct yx_uint16 a, struct yx_uint16 b) {
4 // Compare two coordinates of type yx_uint16.
5 if (a.y == b.y && a.x == b.x) return 1;
8 extern struct yx_uint16 mv_yx_in_dir (char d, struct yx_uint16 yx) {
9 // Return yx coordinates one step to the direction d of yx.
10 if (d == NORTH) yx.y--;
11 else if (d == EAST) yx.x++;
12 else if (d == SOUTH) yx.y++;
13 else if (d == WEST) yx.x--;