resolution bug pomme en dehors de la bordure
This commit is contained in:
parent
63bcdc6bc4
commit
04cb573b9b
Binary file not shown.
@ -33,13 +33,12 @@ void DessinerScene(){
|
||||
pomme=ChargerSprite("IMG/pomme.png");
|
||||
for (p = 0; p < 5; p++) {
|
||||
pommex[p] = ((rand() % (58)+1)*20);
|
||||
pommey[p] = ((rand() % (35)+1)*20);
|
||||
pommey[p] = ((rand() % (34)+1)*20);
|
||||
AfficherSprite(pomme, pommex[p], pommey[p]);
|
||||
}
|
||||
}
|
||||
/*Apparition aléatoire des pommes*/
|
||||
void Pomme(){
|
||||
|
||||
for (pp = 0; pp < 5; ++pp) {
|
||||
AfficherSprite(pomme, pommex[pp], pommey[pp]);
|
||||
}
|
||||
|
@ -51,7 +51,7 @@ void Serpent(){
|
||||
if(pommex[p]==pos_x[0] && pommey[p]==pos_y[0]){
|
||||
segment+=2;
|
||||
pommex[p] = ((rand() % (58)+1)*20);
|
||||
pommey[p] = ((rand() % (35)+1)*20);
|
||||
pommey[p] = ((rand() % (34)+1)*20);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user