diff options
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 |