From 1709b04f238b6b2a0ebc124d8c9da1829900140a Mon Sep 17 00:00:00 2001 From: stiti Date: Fri, 15 Dec 2023 21:46:59 +0100 Subject: [PATCH] =?UTF-8?q?Changement=20du=20nom=20de=20la=20fonction=20ge?= =?UTF-8?q?stionDeplacement=20en=20gestionTouches=20(elle=20g=C3=A8re=20le?= =?UTF-8?q?s=20touches=20et=20pas=20uniquement=20les=20d=C3=A9placements)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/serpent.h | 2 +- src/jeu.c | 2 +- src/serpent.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/serpent.h b/include/serpent.h index f916226..7a48d62 100644 --- a/include/serpent.h +++ b/include/serpent.h @@ -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); diff --git a/src/jeu.c b/src/jeu.c index ea23744..043b7dc 100644 --- a/src/jeu.c +++ b/src/jeu.c @@ -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; } diff --git a/src/serpent.c b/src/serpent.c index 7b8802b..f75e8b0 100644 --- a/src/serpent.c +++ b/src/serpent.c @@ -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();