|
@ -1,6 +1,6 @@ |
|
|
#define _CRT_SECURE_NO_WARNINGS |
|
|
|
|
|
|
|
|
#define _CRT_SECURE_NO_WARNINGS // to write faster |
|
|
#define re return |
|
|
#define re return |
|
|
#define N 20 |
|
|
|
|
|
|
|
|
#define N 20 // size of Play Field |
|
|
#include<stdio.h> |
|
|
#include<stdio.h> |
|
|
#include<string.h> |
|
|
#include<string.h> |
|
|
#include<stdlib.h> |
|
|
#include<stdlib.h> |
|
@ -16,7 +16,7 @@ |
|
|
|
|
|
|
|
|
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); |
|
|
|
|
|
|
|
|
void delay(int ms); //in the first step it remains constant |
|
|
|
|
|
|
|
|
int main(){ |
|
|
int main(){ |
|
|
|
|
|
|
|
@ -58,7 +58,7 @@ void delay(int ms){ |
|
|
} |
|
|
} |
|
|
void Umgebung(int str[N][N]){ |
|
|
void Umgebung(int str[N][N]){ |
|
|
|
|
|
|
|
|
system("cls");// 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"); |
|
|