else if (d == WEST) yx.x--;
return yx; }
-char yx_uint16_cmp (struct yx_uint16 a, struct yx_uint16 b) {
-// Compare two coordinates of type yx_uint16.
- if (a.y == b.y && a.x == b.x) return 1;
- else return 0; }
-
void next_turn (struct World * world) {
// Increment turn and move enemy.
world->turn++;
void save_game(struct World *);
void record_action (char);
struct yx_uint16 mv_yx_in_dir (char, struct yx_uint16);
-char yx_uint16_cmp (struct yx_uint16, struct yx_uint16);
void next_turn (struct World *);
void update_log (struct World *, char *);
void move_player (struct World *, char);
-struct yx_uint16 {
- uint16_t y;
- uint16_t x; };
+#include "yx_uint16.h"
struct Frame {
WINDOW * curses_win;
--- /dev/null
+#include "stdint.h"
+#include "yx_uint16.h"
+
+extern char yx_uint16_cmp (struct yx_uint16 a, struct yx_uint16 b) {
+// Compare two coordinates of type yx_uint16.
+ if (a.y == b.y && a.x == b.x) return 1;
+ else return 0; }
+
--- /dev/null
+struct yx_uint16 {
+ uint16_t y;
+ uint16_t x; };
+
+extern char yx_uint16_cmp (struct yx_uint16, struct yx_uint16);
+