# include <malloc.h>
# include <windows.h>
# include <conio.h>
# include <time.h>
# define ESC 27
# define SPACE 32
# define MAX_X 25
# define MAX_Y 50
int max_food;// 食物总数
int length = 0;// 蛇身长度
char sna_dir = 'd';// 蛇头方向
char temp;
int snaDir_x, snaDir_y;// 蛇头方向坐标
clock_t now_time;// 取系统时钟
double wait_time = 300;// 限制蛇的速度
typedef struct Node// 结构体
{
int x;
int y;
struct Node *pNext;
}NODE, *PNODE;
typedef struct Queue// queue 队列
{
PNODE front;
PNODE rear;
}QUEUE, *PQUEUE;
PQUEUE pSnake = (PQUEUE)malloc(sizeof(QUEUE));// 全局
评论0
最新资源