blob: 29241bfd2939715cc49a1a59c89b40db2c977cf0 (
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, int *fruit_loc, bool *fruit, int *score);
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
|