From 0120421473f5dbc04d7c681ae40eec2f87ec5755 Mon Sep 17 00:00:00 2001 From: bernardt Date: Fri, 17 Dec 2021 19:16:39 +0100 Subject: [PATCH 1/2] graphique fait --- mars_graphic.c | 43 +++++++++++++++++++++++++++++++++++-------- 1 file changed, 35 insertions(+), 8 deletions(-) diff --git a/mars_graphic.c b/mars_graphic.c index 68ad5eb..750e67d 100644 --- a/mars_graphic.c +++ b/mars_graphic.c @@ -7,10 +7,28 @@ #define NBRLIGNES 89 #define NBRCOLONNES 89 - -int main(void){ - -couleur rouge, gris, noir; + +void dessiner_case(int colonne, int ligne, int numerovirus){ + +/* le numerovirus est là pour choisir la couleur à dessiner */ + + couleur rouge, bleu; + + if(numerovirus==1){ + rouge=CouleurParNom("red"); + ChoisirCouleurDessin(rouge); + } + + if(numerovirus==2){ + bleu=CouleurParNom("blue"); + ChoisirCouleurDessin(bleu); + } + + RemplirRectangle(colonne*10+1,ligne*10+1,9,9); + +} +void print_grille(void){ + couleur gris, noir; int i, y; @@ -21,7 +39,6 @@ InitialiserGraphique(); CreerFenetre(0, 0, LONGUEUR, HAUTEUR); gris=CouleurParNom("gray"); -rouge=CouleurParNom("red"); noir=CouleurParNom("black"); ChoisirCouleurDessin(gris); @@ -38,11 +55,21 @@ for (i=0; i Date: Fri, 17 Dec 2021 19:18:55 +0100 Subject: [PATCH 2/2] voila --- mars_compile.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/mars_compile.c b/mars_compile.c index ede34f3..5febfa3 100644 --- a/mars_compile.c +++ b/mars_compile.c @@ -51,15 +51,6 @@ int ouvrir_fichier(char* path){ } printf(" "); - /*if (!feof(fluxouverture) || !strcmp(arg1, buffer)==0){ - for (i=0; i