|
|
@ -15,14 +15,14 @@ int main(){ |
|
|
|
char str[N][N]; |
|
|
|
|
|
|
|
printf("geben Sie die Richtung: ") ; |
|
|
|
char g; |
|
|
|
char g=getchar(); |
|
|
|
|
|
|
|
|
|
|
|
while((g=getchar())!=EOF){ |
|
|
|
if(g!=EOF){ |
|
|
|
//while(true){ |
|
|
|
|
|
|
|
Umgebung(str); |
|
|
|
|
|
|
|
} |
|
|
|
}//} |
|
|
|
|
|
|
|
re 0; |
|
|
|
} |
|
|
@ -36,7 +36,7 @@ void Umgebung(char str[N][N]){ |
|
|
|
int realU[N][N]; |
|
|
|
system("cls"); |
|
|
|
printf("\n"); |
|
|
|
printf("\tHerzlichen Willkommen zum Spiel \n"); |
|
|
|
printf("\t\tHerzlichen Willkommen zum Spiel \n"); |
|
|
|
printf("\n"); |
|
|
|
|
|
|
|
for (int i=0;i<=N;i++){ |
|
|
@ -46,13 +46,16 @@ void Umgebung(char str[N][N]){ |
|
|
|
printf("%c ",str[i][j]);} |
|
|
|
else {str[i][j]= ' '; |
|
|
|
realU[i][j]=0; |
|
|
|
realU[1][1]=1; |
|
|
|
realU[1][2]=1; |
|
|
|
realU[1][3]=1; |
|
|
|
printf("%c",str[i][j]); |
|
|
|
printf("%d",realU[i][j]); |
|
|
|
} |
|
|
|
} |
|
|
|
printf("\n"); |
|
|
|
} |
|
|
|
delay(100); |
|
|
|
delay(100000); |
|
|
|
printf("\n"); |
|
|
|
|
|
|
|
} |