diff --git a/main.c b/main.c index 2884a76..9a7a380 100644 --- a/main.c +++ b/main.c @@ -41,7 +41,7 @@ void gen_pastille(int nb_pastille, int *p_pastilles) /* Ajout des pointeurs pour srand(time(NULL)); - for(i=0;i<nb_pastille;i++) + for(i=0;i<nb_pastille*2;i+=2) { x_pastille= ArrondirPixel(rand()%W_GAME); @@ -64,7 +64,10 @@ void gen_pastille(int nb_pastille, int *p_pastilles) /* Ajout des pointeurs pour y_pastille - DECALEMENT; } - /*printf("x : %d ; y : %d\n",x_pastille,y_pastille); DEBUG*/ + p_pastilles[i] = x_pastille ; + p_pastilles[i+1] = y_pastille ; + + printf("x : %d ; y : %d\n",p_pastilles[i],p_pastilles[i+1]); ChoisirCouleurDessin(r); RemplirRectangle(x_pastille,y_pastille,T_PIXEL,T_PIXEL); @@ -88,8 +91,8 @@ void InitialisationDuSerpent(int *p_serpent) /* L'initialisation du serpent */ couleur j; j=CouleurParNom("yellow"); ChoisirCouleurDessin(j); - x_millieu = ArrondirPixel(T_PIXEL*30); - y_millieu = ArrondirPixel(T_PIXEL*20); + x_millieu = T_PIXEL*30; /* 30 = 60 colonnes divisé par 2*/ + y_millieu = T_PIXEL*20; /* 20 = 40 colonnes divisé par 2*/ RemplirRectangle(x_millieu,y_millieu,T_PIXEL,T_PIXEL); /* printf("x_millieu : %d | y_millieu : %d\n",x_millieu,y_millieu); DEBUG*/ diff --git a/prog b/prog index 285fd4d..9d110c3 100755 Binary files a/prog and b/prog differ