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:
parent
bc454427f1
commit
1709b04f23
@ -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);
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user