From 0e5b3f2cd7d2cc38ac51245318af5a1fecdd273f Mon Sep 17 00:00:00 2001 From: orfao Date: Fri, 1 Dec 2023 15:57:21 +0100 Subject: [PATCH 1/3] maj --- grille.c/grille.c | 35 ----------------------------------- 1 file changed, 35 deletions(-) delete mode 100644 grille.c/grille.c diff --git a/grille.c/grille.c b/grille.c/grille.c deleted file mode 100644 index 967c6c6..0000000 --- a/grille.c/grille.c +++ /dev/null @@ -1,35 +0,0 @@ -#include -#include -#include - -int* creer_grille(void){ - int* Grille=NULL; - Grille=(int*) malloc(40*60*sizeof(int)); - return Grille; -} - -void creer_grille_graph(){ - int x=200,y=200; - ChoisirCouleurDessin(CouleurParComposante(0,0,0)); - DessinerRectangle(x,y,1200,1000) - DessinerRectangle(x,y,900,600); - for(x=200;x<1100;x=x+15){ - DessinerSegment(x,y,x,800); - } - x=200; - y=200; - for(y=200;y<800;y=y+15){ - DessinerSegment(x,y,1100,y); - } - -} - -int main(void){ - char x; - InitialiserGraphique(); - CreerFenetre(0,0,1300,1300); - creer_grille_graph(); - while(x != 'q'){ - scanf("%c",&x); - } -} \ No newline at end of file From 43cd86612ff564021e73a01b3b8435f64811db4c Mon Sep 17 00:00:00 2001 From: orfao Date: Fri, 1 Dec 2023 15:59:01 +0100 Subject: [PATCH 2/3] maj --- src/grille.c | 33 +++++++++++++++++++++++++++++++++ src/snake.c | 7 +++++++ 2 files changed, 40 insertions(+) create mode 100644 src/grille.c create mode 100644 src/snake.c diff --git a/src/grille.c b/src/grille.c new file mode 100644 index 0000000..be62b7b --- /dev/null +++ b/src/grille.c @@ -0,0 +1,33 @@ +#include +#include +#include + +int* creer_grille(void){ + int* Grille=NULL; + Grille=(int*) malloc(40*60*sizeof(int)); + return Grille; +} + +void creer_grille_graph(){ + int x_grille=0,y_grille=0,x,y; + ChoisirCouleurDessin(CouleurParComposante(0,0,0)); + DessinerRectangle(x_grille,y_grille,1200,1000); + DessinerRectangle(x_grille,y_grille,900,600); + for(x=x_grille;x<1100;x=x+15){ + DessinerSegment(x,y_grille,x,800); + } + for(y=y_grille;y<800;y=y+15){ + DessinerSegment(x_grille,y,1100,y); + } + +} + +int main(void){ + char x; + InitialiserGraphique(); + CreerFenetre(0,0,1300,1300); + creer_grille_graph(); + while(x != 'q'){ + scanf("%c",&x); + } +} \ No newline at end of file diff --git a/src/snake.c b/src/snake.c new file mode 100644 index 0000000..13c1539 --- /dev/null +++ b/src/snake.c @@ -0,0 +1,7 @@ +#include +#include +#include + +void creer_snake(){ + serpent[1] +} \ No newline at end of file From 43dabf2968ac70ca05ad93b2bc3acf13dc3e3fb3 Mon Sep 17 00:00:00 2001 From: orfao Date: Sat, 2 Dec 2023 10:13:12 +0100 Subject: [PATCH 3/3] maj --- src/timer.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/timer.c diff --git a/src/timer.c b/src/timer.c new file mode 100644 index 0000000..73a921a --- /dev/null +++ b/src/timer.c @@ -0,0 +1,28 @@ +#include +#include +#include +#define delta 1000000L + +void creer_timer(void){ + int sec; + unsigned long temps; + temps=Microsecondes(); + while(sec!=10){ + temps=Microsecondes+delta; + printf("%d\n",sec); + sec=temps%11; + } +} + + + + + + + +int main(void){ + InitialiserGraphique(); + CreerFenetre(0,0,1300,1300); + creer_timer(); + FermerGraphique(); +} \ No newline at end of file