|
@ -13,7 +13,7 @@ |
|
|
while( a<= 255) |
|
|
while( a<= 255) |
|
|
printf("%d = %c\n", a , a); |
|
|
printf("%d = %c\n", a , a); |
|
|
a++;} */ |
|
|
a++;} */ |
|
|
|
|
|
|
|
|
|
|
|
int score = 0; |
|
|
void Apfel(int realU[N][N]); |
|
|
void Apfel(int realU[N][N]); |
|
|
void Umgebung(int str[N][N]); |
|
|
void Umgebung(int str[N][N]); |
|
|
void delay(int ms); //in the first step it remains constant |
|
|
void delay(int ms); //in the first step it remains constant |
|
@ -48,6 +48,7 @@ int main(){ |
|
|
|
|
|
|
|
|
}} |
|
|
}} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
re 0; |
|
|
re 0; |
|
|
} |
|
|
} |
|
|
void delay(int ms){ |
|
|
void delay(int ms){ |
|
@ -61,6 +62,7 @@ void Umgebung(int str[N][N]){ |
|
|
system("clear");// wegen der Refrech unsere Seite |
|
|
system("clear");// wegen der Refrech unsere Seite |
|
|
printf("\n"); |
|
|
printf("\n"); |
|
|
printf("\t\033[96mHerzlichen Willkommen zum Spiel: SNAKE \033[0m\n"); |
|
|
printf("\t\033[96mHerzlichen Willkommen zum Spiel: SNAKE \033[0m\n"); |
|
|
|
|
|
|
|
|
printf("\n"); |
|
|
printf("\n"); |
|
|
printf("\033[96m%c\033[0m", 218); |
|
|
printf("\033[96m%c\033[0m", 218); |
|
|
for (int i = 0; i < N * 2 + 2; i++)printf("\033[96m%c\033[0m", 95); |
|
|
for (int i = 0; i < N * 2 + 2; i++)printf("\033[96m%c\033[0m", 95); |
|
@ -79,6 +81,8 @@ void Umgebung(int str[N][N]){ |
|
|
printf("\033[96m%c\033[0m", 192); |
|
|
printf("\033[96m%c\033[0m", 192); |
|
|
for (int i = 0; i < N * 2 + 2; i++)printf("\033[96m%c\033[0m", 95); |
|
|
for (int i = 0; i < N * 2 + 2; i++)printf("\033[96m%c\033[0m", 95); |
|
|
printf("\033[96m%c\n\033[0m", 217); |
|
|
printf("\033[96m%c\n\033[0m", 217); |
|
|
|
|
|
printf("\n"); |
|
|
|
|
|
printf("Score: %d\n", score); |
|
|
delay(100000); //damit wir die Änderungs wahrnehmen können |
|
|
delay(100000); //damit wir die Änderungs wahrnehmen können |
|
|
printf("\n"); |
|
|
printf("\n"); |
|
|
} |
|
|
} |
|
|