Browse Source

refactoring: Score function

remotes/origin/fdai7402-main-patch-42180
fdai7225 2 years ago
parent
commit
8c66077624
  1. 11
      src/Umgebung.c

11
src/Umgebung.c

@ -14,6 +14,7 @@
printf("%d = %c\n", a , a);
a++;} */
int score = 0;
void Score(int score);
void Apfel(int realU[N][N]);
void Umgebung(int str[N][N]);
void delay(int ms); //in the first step it remains constant
@ -55,13 +56,16 @@ int main(){
printf(" Game Over\n");
printf("Score: %d\n", score);
}*/
Score(score);
re 0;
}
void Score(int score){
if (score == 0) {
printf(" ____._.____\n");
printf(" [___________]\n\n");
printf("YOU LOSE\n\n");
}
if (score == 7) {
printf("SIIIIIUUUUUU\n\n");
@ -72,9 +76,8 @@ int main(){
printf("Nice\n\n");
printf("mach so weiter...\n\n");
}
re 0;
}
void delay(int ms){
clock_t start = clock();
while (clock() < start + ms);

Loading…
Cancel
Save