ajout dez fichier main et correction de fichier taille.h
This commit is contained in:
4
Makefile
4
Makefile
@@ -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
16
main.c
@@ -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
2
menu.c
@@ -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
9
menu.h
Normal file
@@ -0,0 +1,9 @@
|
||||
#ifndef MENU_H
|
||||
#define MENU_H
|
||||
|
||||
|
||||
|
||||
|
||||
void afficherTaille();
|
||||
|
||||
#endif
|
||||
3
taille.c
3
taille.c
@@ -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 */
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user