#include<stdio.h>
#include<windows.h>
#define up 72
#define down 80
#define left 75
#define right 77
void gotoxy(int x,int y)
{
COORD pos= {x,y};
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), pos);
}
void map()
{
printf("忙式式成式式成式式成式式成式式忖\n");
printf("弛﹛弛﹛弛﹛弛﹛弛﹛弛\n");
printf("戍式式托式式托式式托式式托式式扣\n");
printf("弛﹛弛﹛弛﹛弛﹛弛﹛弛\n");
printf("戍式式托式式托式式托式式托式式扣\n");
printf("弛﹛弛﹛弛﹛弛﹛弛﹛弛\n");
printf("戍式式托式式托式式托式式托式式扣\n");
printf("弛﹛弛﹛弛﹛弛﹛弛﹛弛\n");
printf("戍式式托式式托式式托式式托式式扣\n");
printf("弛﹛弛﹛弛﹛弛﹛弛﹛弛\n");
printf("戌式式扛式式扛式式扛式式扛式式戎\n");
}
int main()
{
char key;
map();
int x,y;
x=1;
y=1;
//gotoxy(x,y);
//printf("★");
while(1)
{
if(kbhit())
{
gotoxy(x,y);
printf(" ");
key = getch();
switch(key)
{
case up:
if(y>0)
{
y-=2;
}
break;
case down:
if(y<9)
{
y+=2;
}
break;
case left:
if(x>0)
{
x-=3;
}
break;
case right:
if(x<13)
{
x+=3;
}
break;
}
gotoxy(x,y);
printf("≧");
}
}
return 0;
}