summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-11-12 23:10:38 +1300
committerTom Ryder <tom@sanctum.geek.nz>2018-11-12 23:11:12 +1300
commit6fde432c11e99b812f3094d74e2640c04cab09b4 (patch)
treeb0661d594c6deed8ade571569f463662a13ca3f3
parentRemove implicit array bound (diff)
downloadtexad-6fde432c11e99b812f3094d74e2640c04cab09b4.tar.gz
texad-6fde432c11e99b812f3094d74e2640c04cab09b4.zip
Move command definitions back to .c file
-rw-r--r--texad.c10
-rw-r--r--texad.h10
2 files changed, 10 insertions, 10 deletions
diff --git a/texad.c b/texad.c
index d6a6d17..7ba845d 100644
--- a/texad.c
+++ b/texad.c
@@ -4,6 +4,16 @@
#include "texad.h"
+struct command commands[] = {
+ {LOOK , "l" },
+ {GO_NORTH , "n" },
+ {GO_SOUTH , "s" },
+ {GO_EAST , "e" },
+ {GO_WEST , "w" },
+ {QUIT , "q" },
+ {UNKNOWN , NULL}
+};
+
struct world *genesis(void)
{
struct world *w;
diff --git a/texad.h b/texad.h
index ec65ef1..a0f1c37 100644
--- a/texad.h
+++ b/texad.h
@@ -52,13 +52,3 @@ enum action parse(char *);
void move(struct player *, enum direction);
void look(struct room *);
int loop(struct world *);
-
-struct command commands[] = {
- {LOOK , "l" },
- {GO_NORTH , "n" },
- {GO_SOUTH , "s" },
- {GO_EAST , "e" },
- {GO_WEST , "w" },
- {QUIT , "q" },
- {UNKNOWN , NULL}
-};