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