#include
#include
#include
#include
void gotoxy(int x,int y)
//cursor an gewuenschte position auf dem bildschirm setzen
{
CONSOLE_SCREEN_BUFFER_INFO
csbiInfo;
//variablendklaration
HANDLE
hConsoleOut;
hConsoleOut = GetStdHandle(STD_OUTPUT_HANDLE);
GetConsoleScreenBufferInfo(hConsoleOut,&csbiInfo);
csbiInfo.dwCursorPosition.X = x;
//cursorposition X koordinate festlegen
csbiInfo.dwCursorPosition.Y = y;
//cursorposition Y koordinate festlegen
SetConsoleCursorPosition(hConsoleOut,csbiInfo.dwCursorPosition);
//den
cursor
an
die
festgelegte koordinate setzen
}
int x=10, y=10,ch,i,j,n,m;
int map[15][15]={
1,1,0,1,0,0,0,0,0,0,0,0,0,0,1,
1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,
};
void tell()
{
if(map[y-1][x-1]==1){map[y-1][x-1]=0;n++;}
if(n>=m){system("cls");printf("win");getch();}
}
void draw(int x,int y)