#include #include #include #define SOL 75 #define SAG 77 #define YUKARI 72 #define ASAGI 80 #define SOLSINIR 4 #define SAGSINIR 57 #define ALTSINIR 24 #define USTSINIR 6 void gotoxy(int x, int y); void hidecursor(); int yemcagir; int sayix,sayiy,i; void yemle() { sayix = rand() % 15 + 5; sayiy = rand() % 15 + 5; HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE); COORD pos = {sayiy, sayix}; SetConsoleCursorPosition(hConsole, pos); WriteConsole(hConsole, "*", 10, NULL, NULL); } void main() { printf("CIKIS ICIN SIFIRA BAS"); int karx=15,kary=13; int x=15, y=10, ch1, ch2 ; hidecursor(); gotoxy(karx, kary); printf("c"); ch1 = getch(); ch2 = 0; srand(time(NULL)); if (ch1 == 0xE0) { while(ch2=getch()) { yemcagir=1+rand()%45; if(yemcagir==40) yemle(); if(ch2 == 'X') exit(0); if(ch2 == SOL) { if(karx>SOLSINIR) { gotoxy(--karx,kary); printf("c"); gotoxy(karx+1,kary); printf(" "); } } if(ch2 == SAG) { if(karxUSTSINIR) { gotoxy(karx,--kary); printf("c"); gotoxy(karx,kary+1); printf(" "); } } if(ch2 == ASAGI) { if(kary