SAE11_2023/SAE_semestre1/out/fruit.c

21 lines
471 B
C
Raw Normal View History

#include <stdlib.h>
#include <graph.h>
#include <time.h>
#include "fruit.h"
void pomme(){
int pos_x[60];
int pos_y[60];
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]){
pommex[p] = ((rand() % (60)+1)*20);
pommey[p] = ((rand() % (27)+1)*20);
}
}
for(pp = 0; pp < 5; ++pp){
AfficherSprite(pomme, pommex[pp], pommey[pp]);
}
}