2023-12-05 21:41:28 +01:00
|
|
|
#ifndef SERPENT_H
|
|
|
|
#define SERPENT_H
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
int x, y;
|
|
|
|
} Segment;
|
2023-12-13 13:42:56 +01:00
|
|
|
typedef Segment* Serpent;
|
2023-12-05 21:41:28 +01:00
|
|
|
|
2023-12-13 13:42:56 +01:00
|
|
|
void initialiserSerpent(Serpent serpent, int *longueur);
|
|
|
|
int gestionDeplacements(Serpent serpent, int *direction_x, int *direction_y);
|
|
|
|
int tuerSerpent(Serpent serpent, int longueur);
|
|
|
|
void mettreAJourSerpent(Serpent serpent, int *longueur, int *direction_x, int *direction_y);
|
|
|
|
void dessinerSerpent(Serpent serpent, int *longueur);
|
2023-12-09 21:43:13 +01:00
|
|
|
void attendreSerpent(unsigned long int microseconds);
|
2023-12-05 21:41:28 +01:00
|
|
|
|
|
|
|
#endif /*SERPENT_H*/
|