-
Notifications
You must be signed in to change notification settings - Fork 1
/
game.h
54 lines (51 loc) · 867 Bytes
/
game.h
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
// game.h
#ifndef GAME_H
#define GAME_H
#include <Windows.h>
// 全局变量声明
extern int maphigh, mapwide;
extern struct virus virus;
extern struct snake snake;
extern unsigned short snakesize, speed, len;
extern int key;
extern struct barrier barrier;
extern int max;
extern int flag;
// 数据结构声明
struct virus {
int x;
int y;
};
struct barrier {
int x[10];
int y[10];
};
struct snake {
int x[50];
int y[50];
int len;
int speed;
};
// 函数声明
void gotoxy(int x, int y);
void drawmap();
void keydown();
void creatvirus();
int snakestatus();
void startgame();
int menuselect();
void goodbye();
void introduce();
void edition();
int setup();
void respect();
int setup1();
int modifydiffculty();
void diffculty();
int customize();
void customize1();
void colors();
void cutsnake(int k);
void ReadGrade();
void WriteGrade();
#endif // GAME_H