Files
SAE11_2023/SAE_semestre1/src/pastille.c

23 lines
581 B
C

#include <stdlib.h>
#include <graph.h>
#include "../fichier.h/pastille.h"
#include "../fichier.h/serpent.h"
#include "../fichier.h/pastille.h"
void Pomme(){
int pos_x[60];
int pos_y[60];
int segment = 10;
int p, pp;
int pomme, pommex[5], pommey[5];
for(p=0; p<6; p++){
if(pommex[p]==pos_x[0] && pommey[p]==pos_y[0]){
segment+=2;
pommex[p] = ((rand() % (60)+1)*20);
pommey[p] = ((rand() % (27)+1)*20);
}
}
for(pp = 0; pp < 5; ++pp){
AfficherSprite(pomme, pommex[pp], pommey[pp]);
}
}