debug struct serpent

This commit is contained in:
2023-12-12 16:03:47 +01:00
parent ee032fe2e9
commit 15a99a4583
6 changed files with 22 additions and 30 deletions

6
main.c
View File

@@ -95,9 +95,9 @@ int main()
int n = 0;
int m = 0;
size_t longueur_serpent = 20;
size_t longueur_serpent = 10;
size_t longueur_pastilles = 10;
int *serpent = (int *)malloc(longueur_serpent * sizeof(int));
PIXELS *serpent = (PIXELS *)malloc(longueur_serpent * sizeof(PIXELS));
PIXELS *pastilles = (PIXELS *)malloc(longueur_pastilles * sizeof(PIXELS));
int direction = 0;
@@ -186,7 +186,7 @@ int main()
if(MangerPastille(serpent,pastilles,&score) == 1)
{
longueur_serpent+=2;
serpent = (int*) realloc(serpent,longueur_serpent * sizeof(int));
serpent = (PIXELS*) realloc(serpent,longueur_serpent * sizeof(PIXELS));
}
}
}