diff options
author | knolax <1339802534.kk@gmail.com> | 2018-03-10 00:46:42 -0500 |
---|---|---|
committer | knolax <1339802534.kk@gmail.com> | 2018-03-10 00:46:42 -0500 |
commit | efa886a32cabc7387d539c728b4d99ebca0ecd45 (patch) | |
tree | 10020923df8fc5fb460d4b9eaccefab4c34ea46a /turtle.h |
initial commit
Diffstat (limited to 'turtle.h')
-rw-r--r-- | turtle.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/turtle.h b/turtle.h new file mode 100644 index 0000000..bac9557 --- /dev/null +++ b/turtle.h @@ -0,0 +1,27 @@ +#ifndef TURTLE_H +#define TURTLE_H +/*directions, CCwise like on a coordinate plane */ +#include<stdio.h> +#include<unistd.h> +#define RIGHT 0 +#define UP 1 +#define LEFT 2 +#define DOWN 3 +/* map everything is held in + */ +char map[20][20]; +/*turtle positions */ +extern int tx; +extern int ty; +/*turtle direction*/ +extern int td; +/* loads map from file, returns any IO errors, assumes map is 20x20 ascii + * chars + * this does the first printing of the screen + */ +extern int loadmap(char * filename); +/*movement of the turtle*/ +extern void go(int blocks); +extern void turn(int direction); +void printmap(); +#endif |