ajout dez fichier main et correction de fichier taille.h

This commit is contained in:
ozvann
2024-10-25 13:08:43 +02:00
parent 9ba0c335b0
commit b0bcf200a0
6 changed files with 33 additions and 3 deletions

View File

@@ -14,7 +14,7 @@ OFILES = deplacement.o \
CC = gcc
CFLAGS = -Wall -ansi -pedantic -g -lgraph
CFLAGS = -Wall -ansi -pedantic -g
# CHAPITRE 3 : DEPENDANCES (REGLES IMPLICITES)
@@ -34,7 +34,7 @@ obstacle.o : pion.o
# CHAPITRE 4 : DEPENDANCES AVEC COMMANDES
game : $(OFILES)
$(CC) $(CFLAGS) -o game $(OFILES)
$(CC) $(CFLAGS) -o game $(OFILES) -lgraph
# CHAPITRE 5 : NETTOYAGE DES FICHIERS GENERES

16
main.c
View File

@@ -0,0 +1,16 @@
#include <graph.h>
#include "menu.h"
int main (void){
while(1){
InitialiserGraphique();
CreerFenetre(10, 10, 50 * 50 + 1, 60 * 60 + 100);
EffacerEcran(CouleurParNom("white"));
}
}

2
menu.c
View File

@@ -13,6 +13,6 @@ int afficherMenu() {
ChoisirCouleurDessin(CouleurParNom("black"));
EcrireTexte(x, y, "Taille de grille entre 3 et 9 :", 2);
y = y + 50;
ChoisirCouleurDesson(CouleurParNom("red");
ChoisirCouleurDessin(CouleurParNom("red"));
EcrireTexte(x, y, "Attente du choix de l'utilisateur...", 2);
}

9
menu.h Normal file
View File

@@ -0,0 +1,9 @@
#ifndef MENU_H
#define MENU_H
void afficherTaille();
#endif

View File

@@ -1,6 +1,9 @@
#include <graph.h>
#include "taille.h"
/* Code permettant de choisir la taille de la grille en fonction du chiffre que l'utilisateur a entrer qui est compris entre 3 et 9 */

View File

@@ -5,3 +5,5 @@
void GererChoixTaille(int *TailleGrille);
#endif