maj
This commit is contained in:
parent
0e5b3f2cd7
commit
43cd86612f
33
src/grille.c
Normal file
33
src/grille.c
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
#include <stdlib.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <graph.h>
|
||||||
|
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
7
src/snake.c
Normal file
7
src/snake.c
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#include<stdio.h>
|
||||||
|
#include<stdlib.h>
|
||||||
|
#include<graph.h>
|
||||||
|
|
||||||
|
void creer_snake(){
|
||||||
|
serpent[1]
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user