-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunc.h
More file actions
35 lines (31 loc) · 730 Bytes
/
func.h
File metadata and controls
35 lines (31 loc) · 730 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#ifndef func_h
#define func_h
enum moving_type
{
MOVING_LEFT,
MOVING_RIGHT,
MOVING_UP,
MOVING_DOWN
};
struct location_food
{
int row;
int col;
};
struct iron_man
{
void (*skill_01)(void);
void (*skill_02)(void);
char *name;
};
void reset_map(void);
void create_new_snake(void);
void init_map(void);
void display_map(void);
void snake_run(char snake_direction);
void control_snake_run(void);
struct location_food *gen_randum_number(int row_min, int row_max, int col_min, int col_max);
struct location_food *check_snake_gen_food(struct location_food *snake_food, int limit);
struct location_food * gen_food_ramdum(void);
void food_appear_randum(void);
#endif