Changement du nom de la fonction gestionDeplacement en gestionTouches (elle gère les touches et pas uniquement les déplacements)

This commit is contained in:
stiti 2023-12-15 21:46:59 +01:00
parent bc454427f1
commit 1709b04f23
3 changed files with 3 additions and 3 deletions

View File

@ -7,7 +7,7 @@ typedef struct {
typedef Segment* Serpent;
void initialiserSerpent(Serpent serpent, int *longueur);
int gestionDeplacements(Serpent serpent, int *direction_x, int *direction_y);
int gestionTouches(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,int id_tete);

View File

@ -53,7 +53,7 @@ void jouer(int nbPommes, unsigned long int vitesse,int acceleration) { /*fa
}
while (1) {
esc = gestionDeplacements(serpent, &direction_x, &direction_y);
esc = gestionTouches(serpent, &direction_x, &direction_y);
if (esc == 1) {
return;
}

View File

@ -20,7 +20,7 @@ void initialiserSerpent(Serpent serpent, int *longueur) {
*longueur = 10;
}
int gestionDeplacements(Serpent serpent, int *direction_x, int *direction_y) {
int gestionTouches(Serpent serpent, int *direction_x, int *direction_y) {
int touche;
if (ToucheEnAttente()) {
touche = Touche();