Merge branch 'master' of https://dwarves.iut-fbleau.fr/gitiut/stiti/SAE11_2023
This commit is contained in:
commit
ad2b076328
@ -1,35 +0,0 @@
|
|||||||
#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=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);
|
|
||||||
}
|
|
||||||
}
|
|
12
src/grille.c
12
src/grille.c
@ -9,6 +9,17 @@ int* creer_grille(void){
|
|||||||
}
|
}
|
||||||
|
|
||||||
void creer_grille_graph(){
|
void creer_grille_graph(){
|
||||||
|
<<<<<<< HEAD
|
||||||
|
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 x=200,y=200;
|
int x=200,y=200;
|
||||||
ChoisirCouleurDessin(CouleurParComposante(0,0,0));
|
ChoisirCouleurDessin(CouleurParComposante(0,0,0));
|
||||||
DessinerRectangle(x,y,1200,1000);
|
DessinerRectangle(x,y,1200,1000);
|
||||||
@ -20,6 +31,7 @@ void creer_grille_graph(){
|
|||||||
y=200;
|
y=200;
|
||||||
for(y=200;y<800;y=y+15){
|
for(y=200;y<800;y=y+15){
|
||||||
DessinerSegment(x,y,1100,y);
|
DessinerSegment(x,y,1100,y);
|
||||||
|
>>>>>>> 03cdfc71722afd1d8631e3ed432af6d031cd9b7e
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
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]
|
||||||
|
}
|
28
src/timer.c
Normal file
28
src/timer.c
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
#include<stdio.h>
|
||||||
|
#include<stdlib.h>
|
||||||
|
#include<graph.h>
|
||||||
|
#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();
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user