#include <stdio.h>
#include <conio.h>
#include <windows.h>
#include <time.h>
/**********************常量定义********************/
#define Height 57
#define Width 109
#define Wall 1
#define Road 0
#define Start 2
#define End 3
#define Esc 5
#define Up 1
#define Down 2
#define Left 3
#define Right 4
/**********************常量定义********************/
int map[Height+2][Width+2];//终点
int x=2,y=1;//起点
/**********************函数声明********************/
void menu();
void hidden();
void prepare();
void create(int x,int y);
void paint(int x,int y);
void game();
int get_key();
void gotoxy(int x,int y);
/**********************函数声明********************/
void gotoxy(int x,int y){ //移动坐标
COORD coord;
coord.X=x;
coord.Y=y;
SetConsoleCursorPosition( GetStdHandle( STD_OUTPUT_HANDLE ), coord );
}
void hidden(){//隐藏光标
HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);
CONSOLE_CURSOR_INFO cci;
GetConsoleCursorInfo(hOut,&cci);
cci.bVisible=0;//赋1为显示,赋0为隐藏
SetConsoleCursorInfo(hOut,&cci);
}
int get_key(){ //接收按键
char c;
while(c=getch())
{
if(c==27) return Esc; //Esc
if(c!=-32)continue;
c=getch();
if(c==72) return Up; //上
if(c==80) return Down; //下
if(c==75) return Left; //左