|
@ -6,13 +6,9 @@ |
|
|
#include<stdlib.h> |
|
|
#include<stdlib.h> |
|
|
#include<time.h> |
|
|
#include<time.h> |
|
|
#include<stdbool.h> |
|
|
#include<stdbool.h> |
|
|
|
|
|
//#include "Umgebung.h" |
|
|
|
|
|
|
|
|
// Bellow you can find the function ASCI with which we designed the box and snake and food |
|
|
|
|
|
/*int main(){ |
|
|
|
|
|
int a = 0; |
|
|
|
|
|
while( a<= 255) |
|
|
|
|
|
printf("%d = %c\n", a , a); |
|
|
|
|
|
a++;} */ |
|
|
|
|
|
|
|
|
void ASCI();//Bellow you can find the function ASCI with which we designed the box and snake and food |
|
|
int score = 0; |
|
|
int score = 0; |
|
|
void Anweisung(char s[N]); |
|
|
void Anweisung(char s[N]); |
|
|
void RealU(int realU1[N][N]); |
|
|
void RealU(int realU1[N][N]); |
|
@ -47,6 +43,8 @@ int main(){ |
|
|
|
|
|
|
|
|
re 0; |
|
|
re 0; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void Anweisung(char s[N]){ |
|
|
void Anweisung(char s[N]){ |
|
|
printf("\t\033[96m Herzlichen Willkommen zum Spiel: SNAKE \033[0m\n"); |
|
|
printf("\t\033[96m Herzlichen Willkommen zum Spiel: SNAKE \033[0m\n"); |
|
|
printf("\t\033[96m Geben Sie Ihr Name ein bitte: \033[0m\n"); |
|
|
printf("\t\033[96m Geben Sie Ihr Name ein bitte: \033[0m\n"); |
|
@ -103,6 +101,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("\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); |
|
@ -127,7 +126,6 @@ void Umgebung(int str[N][N]){ |
|
|
printf("\n"); |
|
|
printf("\n"); |
|
|
Score(score); |
|
|
Score(score); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void Apfel(int realU[N][N]){ |
|
|
void Apfel(int realU[N][N]){ |
|
|
int ii,jj; |
|
|
int ii,jj; |
|
|
while (true) |
|
|
while (true) |
|
@ -139,6 +137,7 @@ void Apfel(int realU[N][N]){ |
|
|
re; |
|
|
re; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
<<<<<<< HEAD |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
int win(int realU[N][N]){ |
|
|
int win(int realU[N][N]){ |
|
@ -203,3 +202,11 @@ int lose(int realU[N][N], char richtung){ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
======= |
|
|
|
|
|
} |
|
|
|
|
|
void ASCI(){ |
|
|
|
|
|
int a = 0; |
|
|
|
|
|
while( a<= 255) |
|
|
|
|
|
printf("%d = %c\n", a , a); |
|
|
|
|
|
a++;} |
|
|
|
|
|
>>>>>>> d029413 (refactoring: ASCI) |