|
|
@ -1,22 +1,25 @@ |
|
|
|
#define _CRT_SECURE_NO_WARNINGS |
|
|
|
#define re return |
|
|
|
#define N 40 |
|
|
|
#include<stdio.h> |
|
|
|
#include<string.h> |
|
|
|
#include<stdlib.h> |
|
|
|
#include<time.h> |
|
|
|
#include<stdbool.h> |
|
|
|
|
|
|
|
#define N 40 |
|
|
|
void Umgebung(char str[N][N]); |
|
|
|
void delay(int ms); |
|
|
|
|
|
|
|
int main(){ |
|
|
|
|
|
|
|
char str[N][N]; |
|
|
|
|
|
|
|
printf("geben Sie die Richtung: ") ; |
|
|
|
char g; |
|
|
|
|
|
|
|
|
|
|
|
while((g=getchar())!=EOF){ |
|
|
|
|
|
|
|
|
|
|
|
char str[N][N]; |
|
|
|
Umgebung(str); |
|
|
|
|
|
|
|
} |
|
|
@ -30,7 +33,7 @@ void delay(int ms){ |
|
|
|
|
|
|
|
} |
|
|
|
void Umgebung(char str[N][N]){ |
|
|
|
|
|
|
|
int realU[N][N]; |
|
|
|
system("cls"); |
|
|
|
printf("\n"); |
|
|
|
printf("\tHerzlichen Willkommen zum Spiel \n"); |
|
|
@ -40,12 +43,16 @@ void Umgebung(char str[N][N]){ |
|
|
|
for(int j=0;j<=N;j++){ |
|
|
|
if((i==0)||(j==0)||(i==N)||(j==N)){ |
|
|
|
str[i][j]= '+'; |
|
|
|
printf("%c",str[i][j]);} |
|
|
|
printf("%c ",str[i][j]);} |
|
|
|
else {str[i][j]= ' '; |
|
|
|
printf("%c",str[i][j]);} |
|
|
|
realU[i][j]=0; |
|
|
|
printf("%c",str[i][j]); |
|
|
|
printf("%d",realU[i][j]); |
|
|
|
} |
|
|
|
} |
|
|
|
printf("\n"); |
|
|
|
} |
|
|
|
delay(1000); |
|
|
|
delay(100); |
|
|
|
printf("\n"); |
|
|
|
|
|
|
|
} |