2023-12-14 15:00:02 +01:00
|
|
|
#include <stdlib.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include "../fichier.h/time.h"
|
2023-12-07 14:32:42 +01:00
|
|
|
#include "../fichier.h/terrain.h"
|
2023-12-14 15:00:02 +01:00
|
|
|
#include "../fichier.h/pastille.h"
|
|
|
|
#include "../fichier.h/serpent.h"
|
|
|
|
#include "../fichier.h/menu.h"
|
2023-12-19 14:34:55 +01:00
|
|
|
#include "../fichier.h/ajouter_menu_fin.h"
|
2023-12-01 13:32:18 +01:00
|
|
|
|
2023-12-14 15:00:02 +01:00
|
|
|
int main(void){
|
|
|
|
int go_on = 1;
|
|
|
|
int segment = 10;
|
|
|
|
int* pointeur_segment = &segment;
|
|
|
|
int* pointeur_go_on= &go_on;
|
|
|
|
int seconde_actuel;
|
|
|
|
int old_seconde;
|
|
|
|
unsigned long int suivant;
|
|
|
|
InitialiserGraphique();
|
|
|
|
CreerFenetre(350,100,1200,900);
|
|
|
|
EffacerEcran(CouleurParComposante(0,0,0));
|
|
|
|
suivant = Microsecondes()+CYCLE;
|
|
|
|
old_seconde=(suivant/1000000)%10;
|
|
|
|
DessinerScene();
|
|
|
|
usleep(1000);
|
|
|
|
while(go_on){
|
|
|
|
Timer();
|
2023-12-18 14:59:07 +01:00
|
|
|
Score();
|
|
|
|
Serpent();
|
2023-12-14 15:00:02 +01:00
|
|
|
Pomme();
|
|
|
|
}
|
|
|
|
FermerGraphique();
|
2023-12-19 14:34:55 +01:00
|
|
|
}
|