diff --git a/SAE_semestre1/Makefile b/SAE_semestre1/Makefile index b6b8bb2..3e532b9 100755 --- a/SAE_semestre1/Makefile +++ b/SAE_semestre1/Makefile @@ -23,9 +23,8 @@ run : $(EXE) clean : -rm -rf $(ODIR) -# Nouvelle règle pour la dépendance implicite $(EXE): $(ODIR)/a.out -# Nouvelle règle pour construire 'out/a.out' +# construction 'out/a.out' $(ODIR)/a.out: $(OFILES) $(CC) $(CFLAGS) -o $@ $(OFILES) \ No newline at end of file diff --git a/SAE_semestre1/fichier.h/main.h b/SAE_semestre1/fichier.h/main.h index a73dc70..3b4b945 100755 --- a/SAE_semestre1/fichier.h/main.h +++ b/SAE_semestre1/fichier.h/main.h @@ -1,7 +1,6 @@ #ifndef MAIN_H #define MAIN_H - void attente(int milliseconds); int lancer_jeu(void); int main(void); diff --git a/SAE_semestre1/snake b/SAE_semestre1/snake index abcf06d..2d1e0ff 100755 Binary files a/SAE_semestre1/snake and b/SAE_semestre1/snake differ diff --git a/SAE_semestre1/src/Oeuf.c b/SAE_semestre1/src/Oeuf.c index 69f2941..8870a6b 100755 --- a/SAE_semestre1/src/Oeuf.c +++ b/SAE_semestre1/src/Oeuf.c @@ -8,6 +8,7 @@ void InitialiserOeufs(int oeufx[], int oeufy[], int segment) { int p; int oeuf; + /*Boucles qui initialse 5 pommes aléatoirement*/ for (p = 0; p < 5; p++) { oeufx[p] = ((rand() % (55) + 1) * 20); oeufy[p] = ((rand() % (35) + 1) * 20); @@ -20,6 +21,7 @@ void Oeuf(int old_x[], int old_y[], int oeufx[], int oeufy[], int *segment){ for (p = 0; p < 5; p++) { ChargerImage("img/oeuf.png", oeufx[p], oeufy[p],0,0, 20,20); } + /*Boucles pour vérifiier la colision avec le serpent */ for(p=0; p<5; p++){ if(oeufx[p]==old_x[0] && oeufy[p]==old_y[0]){ (*segment) +=2; diff --git a/SAE_semestre1/src/main.c b/SAE_semestre1/src/main.c index da62b8c..04ee5d9 100644 --- a/SAE_semestre1/src/main.c +++ b/SAE_semestre1/src/main.c @@ -76,7 +76,7 @@ int lancer_jeu(){ Collision_Serpent(pos_x, pos_y, segment, murx, mury, &go_on); attente(DELAI_MILLISECONDES); Oeuf(pos_x, pos_y, oeufx, oeufy, pointeur_segment); - } + } } } diff --git a/SAE_semestre1/src/menu.c b/SAE_semestre1/src/menu.c index 5c59e3b..fda31c5 100755 --- a/SAE_semestre1/src/menu.c +++ b/SAE_semestre1/src/menu.c @@ -14,6 +14,7 @@ void Menu_fin(void){ int fin = ChargerSprite("img/Menu_Fin.jpg"); AfficherSprite(fin, 0,0); } + int Menu(void) { int choix = 1; InitialiserGraphique(); diff --git a/SAE_semestre1/src/terrain.c b/SAE_semestre1/src/terrain.c index 2ed4598..6a59817 100755 --- a/SAE_semestre1/src/terrain.c +++ b/SAE_semestre1/src/terrain.c @@ -19,6 +19,7 @@ void Scene(int murx[], int mury[], int minute, int seconde, char timer []){ RemplirRectangle(20,20,1160,700); ChoisirCouleurDessin(CouleurParComposante(255,255,255)); srand(time(NULL)); + /*Initialisation de 30 obstacles */ for(i=0; i<30; i++){ murx[i] = ((rand() % (55)+1)*20); mury[i] = ((rand() % (35)+1)*20); diff --git a/bashrc b/bashrc deleted file mode 100644 index e69de29..0000000