blob: a1957bc5b957db4881940f2e29f09d8d76bfca26 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#ifndef BODY_H
#define BODY_H
typedef struct node NODE;
typedef struct snake SNAKE;
SNAKE *makeSnake(int startx, int starty, int len);
void deleteSnake(SNAKE *sp);
void updateSnake(SNAKE *sp, int dir, int maxx, int maxy, bool *collision);
bool checkSnake(SNAKE *sp, int maxx, int maxy);
int getSnakeTailx(SNAKE *sp);
int getSnakeTaily(SNAKE *sp);
int getSnakeHeadx(SNAKE *sp);
int getSnakeHeady(SNAKE *sp);
#endif
|