diff --git a/AutomatiqueActionListener.class b/AutomatiqueActionListener.class deleted file mode 100644 index c66d6db..0000000 Binary files a/AutomatiqueActionListener.class and /dev/null differ diff --git a/CaseMouseListener.class b/CaseMouseListener.class deleted file mode 100644 index fd52052..0000000 Binary files a/CaseMouseListener.class and /dev/null differ diff --git a/FenetreChoix.class b/FenetreChoix.class deleted file mode 100644 index dacb400..0000000 Binary files a/FenetreChoix.class and /dev/null differ diff --git a/FenetrePrincipale.class b/FenetrePrincipale.class deleted file mode 100644 index 36ba0cc..0000000 Binary files a/FenetrePrincipale.class and /dev/null differ diff --git a/GrillePainter.class b/GrillePainter.class deleted file mode 100644 index f389392..0000000 Binary files a/GrillePainter.class and /dev/null differ diff --git a/GrilleSudokuDessin.class b/GrilleSudokuDessin.class deleted file mode 100644 index 28cb06b..0000000 Binary files a/GrilleSudokuDessin.class and /dev/null differ diff --git a/Grilles.class b/Grilles.class deleted file mode 100644 index 18560e4..0000000 Binary files a/Grilles.class and /dev/null differ diff --git a/Lecteur.class b/Lecteur.class deleted file mode 100644 index ecbf45f..0000000 Binary files a/Lecteur.class and /dev/null differ diff --git a/Main$1.class b/Main$1.class deleted file mode 100644 index 4b9c11b..0000000 Binary files a/Main$1.class and /dev/null differ diff --git a/Main$2.class b/Main$2.class deleted file mode 100644 index 83fe023..0000000 Binary files a/Main$2.class and /dev/null differ diff --git a/Main$3.class b/Main$3.class deleted file mode 100644 index 5b13b1c..0000000 Binary files a/Main$3.class and /dev/null differ diff --git a/Main.class b/Main.class deleted file mode 100644 index 767f63c..0000000 Binary files a/Main.class and /dev/null differ diff --git a/MainCreation$1.class b/MainCreation$1.class deleted file mode 100644 index 8f193d8..0000000 Binary files a/MainCreation$1.class and /dev/null differ diff --git a/MainCreation$2.class b/MainCreation$2.class deleted file mode 100644 index faeddb9..0000000 Binary files a/MainCreation$2.class and /dev/null differ diff --git a/MainCreation$3.class b/MainCreation$3.class deleted file mode 100644 index b1c9365..0000000 Binary files a/MainCreation$3.class and /dev/null differ diff --git a/MainCreation.class b/MainCreation.class deleted file mode 100644 index fa2cb3f..0000000 Binary files a/MainCreation.class and /dev/null differ diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..adcf723 --- /dev/null +++ b/Makefile @@ -0,0 +1,56 @@ +# Variables +JC = javac +JVM = java +SRCDIR = src +BINDIR = bin +MAINCLASS1 = MainJeu +MAINCLASS2 = MainCreation +SRCFILES := $(wildcard $(SRCDIR)/*.java) +CLASSFILES := $(patsubst $(SRCDIR)/%.java,$(BINDIR)/%.class,$(SRCFILES)) + +# Règles de compilation pour les fichiers Java dans le répertoire src +$(BINDIR)/%.class: $(SRCDIR)/%.java | $(BINDIR) + $(JC) -d $(BINDIR) $< + +# Crée le répertoire bin s'il n'existe pas +$(BINDIR): + mkdir -p $(BINDIR) + +# Règle pour exécuter le premier programme +runJeu: $(CLASSFILES) + $(JVM) -cp $(BINDIR) $(MAINCLASS1) + +# Règle pour exécuter le deuxième programme +runCreation: $(CLASSFILES) + $(JVM) -cp $(BINDIR) $(MAINCLASS2) + +# Règle pour nettoyer les fichiers compilés +clean: + rm -rf $(BINDIR)/* + +# Règle pour créer la documentation +doc: + javadoc -d docs $(SRCDIR)/*.java + +# Règle pour visualiser la documentation +seedoc: + firefox docs/index.html & + +# Définir les cibles factices +.PHONY: build runJeu runCreation clean doc seedoc + +# Règle par défaut +.DEFAULT_GOAL := build + +# Règle pour compiler AutomatiqueActionListener avec ses dépendances +$(BINDIR)/AutomatiqueActionListener.class: $(SRCDIR)/AutomatiqueActionListener.java $(BINDIR)/GenerateurSudoku.class $(BINDIR)/FenetrePrincipale.class $(BINDIR)/Resolveur.class + $(JC) -d $(BINDIR) $< + +# Règle pour compiler FenetrePrincipale avec ses dépendances +$(BINDIR)/FenetrePrincipale.class: $(SRCDIR)/FenetrePrincipale.java $(BINDIR)/SaisieGrille.class $(BINDIR)/ReinitialiserActionListener.class + $(JC) -d $(BINDIR) $< + +# Règle pour compiler SaisieGrille avec ses dépendances +$(BINDIR)/SaisieGrille.class: $(SRCDIR)/SaisieGrille.java $(BINDIR)/CaseMouseListener.class $(BINDIR)/GrillePainter.class + $(JC) -d $(BINDIR) $< + diff --git a/ManuelActionListener.class b/ManuelActionListener.class deleted file mode 100644 index 92d4880..0000000 Binary files a/ManuelActionListener.class and /dev/null differ diff --git a/OuvertureFichier.class b/OuvertureFichier.class deleted file mode 100644 index 039a049..0000000 Binary files a/OuvertureFichier.class and /dev/null differ diff --git a/Register.class b/Register.class deleted file mode 100644 index 79d8696..0000000 Binary files a/Register.class and /dev/null differ diff --git a/Reinitialiser.class b/Reinitialiser.class deleted file mode 100644 index 7a9179d..0000000 Binary files a/Reinitialiser.class and /dev/null differ diff --git a/ReinitialiserActionListener.class b/ReinitialiserActionListener.class deleted file mode 100644 index 8378a28..0000000 Binary files a/ReinitialiserActionListener.class and /dev/null differ diff --git a/Resolveur.class b/Resolveur.class deleted file mode 100644 index c039556..0000000 Binary files a/Resolveur.class and /dev/null differ diff --git a/SaisieGrille$1.class b/SaisieGrille$1.class deleted file mode 100644 index 9c9ec60..0000000 Binary files a/SaisieGrille$1.class and /dev/null differ diff --git a/SaisieGrille.class b/SaisieGrille.class deleted file mode 100644 index 967baf3..0000000 Binary files a/SaisieGrille.class and /dev/null differ diff --git a/SudokuGenerator.class b/SudokuGenerator.class deleted file mode 100644 index c8d4474..0000000 Binary files a/SudokuGenerator.class and /dev/null differ diff --git a/GenerateurSudoku.class b/bin/GenerateurSudoku.class similarity index 53% rename from GenerateurSudoku.class rename to bin/GenerateurSudoku.class index baf4bc2..2340c60 100644 Binary files a/GenerateurSudoku.class and b/bin/GenerateurSudoku.class differ diff --git a/AutomatiqueActionListener.java b/src/AutomatiqueActionListener.java similarity index 100% rename from AutomatiqueActionListener.java rename to src/AutomatiqueActionListener.java diff --git a/CaseMouseListener.java b/src/CaseMouseListener.java similarity index 100% rename from CaseMouseListener.java rename to src/CaseMouseListener.java diff --git a/FenetreChoix.java b/src/FenetreChoix.java similarity index 100% rename from FenetreChoix.java rename to src/FenetreChoix.java diff --git a/FenetrePrincipale.java b/src/FenetrePrincipale.java similarity index 100% rename from FenetrePrincipale.java rename to src/FenetrePrincipale.java diff --git a/GenerateurSudoku.java b/src/GenerateurSudoku.java similarity index 100% rename from GenerateurSudoku.java rename to src/GenerateurSudoku.java diff --git a/GrillePainter.java b/src/GrillePainter.java similarity index 100% rename from GrillePainter.java rename to src/GrillePainter.java diff --git a/GrilleSudokuDessin.java b/src/GrilleSudokuDessin.java similarity index 100% rename from GrilleSudokuDessin.java rename to src/GrilleSudokuDessin.java diff --git a/Grilles.java b/src/Grilles.java similarity index 100% rename from Grilles.java rename to src/Grilles.java diff --git a/Lecteur.java b/src/Lecteur.java similarity index 100% rename from Lecteur.java rename to src/Lecteur.java diff --git a/MainCreation.java b/src/MainCreation.java similarity index 100% rename from MainCreation.java rename to src/MainCreation.java diff --git a/Main.java b/src/MainJeu.java similarity index 89% rename from Main.java rename to src/MainJeu.java index 1699f78..8641b8e 100644 --- a/Main.java +++ b/src/MainJeu.java @@ -1,5 +1,5 @@ -public class Main { +public class MainJeu { public static void main(String[] args) { System.out.println("Le programme Main a démarré."); diff --git a/ManuelActionListener.java b/src/ManuelActionListener.java similarity index 100% rename from ManuelActionListener.java rename to src/ManuelActionListener.java diff --git a/OuvertureFichier.java b/src/OuvertureFichier.java similarity index 100% rename from OuvertureFichier.java rename to src/OuvertureFichier.java diff --git a/Register.java b/src/Register.java similarity index 100% rename from Register.java rename to src/Register.java diff --git a/Reinitialiser.java b/src/Reinitialiser.java similarity index 100% rename from Reinitialiser.java rename to src/Reinitialiser.java diff --git a/ReinitialiserActionListener.java b/src/ReinitialiserActionListener.java similarity index 100% rename from ReinitialiserActionListener.java rename to src/ReinitialiserActionListener.java diff --git a/Resolveur.java b/src/Resolveur.java similarity index 100% rename from Resolveur.java rename to src/Resolveur.java diff --git a/SaisieGrille.java b/src/SaisieGrille.java similarity index 100% rename from SaisieGrille.java rename to src/SaisieGrille.java diff --git a/SudokuGenerator.java b/src/SudokuGenerator.java similarity index 100% rename from SudokuGenerator.java rename to src/SudokuGenerator.java