diff --git a/projetAgile/Makefile b/projetAgile/Makefile index d758d41..8afd933 100644 --- a/projetAgile/Makefile +++ b/projetAgile/Makefile @@ -4,65 +4,31 @@ PACKAGE = fr.iutfbleau.projetAgile PACKAGE_PATH = fr/iutfbleau/projetAgile JAR_OPTION = cvfe projetAgile.jar $(PACKAGE).main.Main -C build fr -C res -#Modele -jar : View modele controleur - jar $(JAR_OPTION) - -View : build/$(PACKAGE_PATH)/View/Fenetre.class \ - build/$(PACKAGE_PATH)/View/Pion.class \ +View : build/$(PACKAGE_PATH)/View/Pion.class \ build/$(PACKAGE_PATH)/View/Grille.class -build/$(PACKAGE_PATH)/View/TestView.class : src/$(PACKAGE_PATH)/View/TestView.java build/$(PACKAGE_PATH)/View/Pion.class - javac $(JAVAC_OPT) src/$(PACKAGE_PATH)/View/TestView.java +Utils : build/$(PACKAGE_PATH)/Utils/Utils.class -build/$(PACKAGE_PATH)/View/Fenetre.class : src/$(PACKAGE_PATH)/View/Fenetre.java \ - build/$(PACKAGE_PATH)/modele/Question.class - javac $(JAVAC_OPT) src/$(PACKAGE_PATH)/View/Fenetre.java +build/$(PACKAGE_PATH)/Utils/Utils.class : src/$(PACKAGE_PATH)/Utils/Utils.java + javac $(JAVAC_OPT) src/$(PACKAGE_PATH)/Utils/Utils.java -build/$(PACKAGE_PATH)/View/Pion.class : src/$(PACKAGE_PATH)/View/Pion.java \ - build/$(PACKAGE_PATH)/View/Fenetre.class - javac $(JAVAC_OPT) src/$(PACKAGE_PATH)/View/Pion.java +build/$(PACKAGE_PATH)/View/Pion.class : src/$(PACKAGE_PATH)/View/Pion.java \ + build/$(PACKAGE_PATH)/Utils/Utils.class + javac $(JAVAC_OPT) src/$(PACKAGE_PATH)/View/Pion.java -build/$(PACKAGE_PATH)/View/Grille.class : src/$(PACKAGE_PATH)/View/Grille.java +build/$(PACKAGE_PATH)/View/Grille.class : src/$(PACKAGE_PATH)/View/Grille.java \ + build/$(PACKAGE_PATH)/View/Pion.class \ + build/$(PACKAGE_PATH)/Utils/Utils.class javac $(JAVAC_OPT) src/$(PACKAGE_PATH)/View/Grille.java -testView : View build/$(PACKAGE_PATH)/View/TestView.class - java -cp build $(PACKAGE).View.TestView +build/$(PACKAGE_PATH)/View/TestGrille.class : src/$(PACKAGE_PATH)/View/TestGrille.java \ + build/$(PACKAGE_PATH)/View/Pion.class \ + build/$(PACKAGE_PATH)/View/Grille.class + javac $(JAVAC_OPT) src/$(PACKAGE_PATH)/View/TestGrille.java -modele : build/$(PACKAGE_PATH)/modele/QuestionSource.class \ - build/$(PACKAGE_PATH)/modele/Question.class \ - build/$(PACKAGE_PATH)/modele/QuestionChoices.class - -build/$(PACKAGE_PATH)/modele/TestModele.class : modele - javac $(JAVAC_OPT) src/$(PACKAGE_PATH)/modele/TestModele.java - -build/$(PACKAGE_PATH)/modele/QuestionSource.class : src/$(PACKAGE_PATH)/modele/QuestionSource.java \ - build/$(PACKAGE_PATH)/modele/Question.class build/$(PACKAGE_PATH)/modele/QuestionChoices.class - javac $(JAVAC_OPT) src/$(PACKAGE_PATH)/modele/QuestionSource.java - -build/$(PACKAGE_PATH)/modele/Question.class : src/$(PACKAGE_PATH)/modele/Question.java \ - build/$(PACKAGE_PATH)/modele/QuestionChoices.class - javac $(JAVAC_OPT) src/$(PACKAGE_PATH)/modele/Question.java - -build/$(PACKAGE_PATH)/modele/QuestionChoices.class : src/$(PACKAGE_PATH)/modele/QuestionChoices.java - javac $(JAVAC_OPT) src/$(PACKAGE_PATH)/modele/QuestionChoices.java - -testModele : modele build/$(PACKAGE_PATH)/modele/TestModele.class - java -cp build $(PACKAGE).modele.TestModele - -controleur : build/$(PACKAGE_PATH)/controleur/ChoiceValidation.class \ - build/$(PACKAGE_PATH)/controleur/Navigation.class \ - build/$(PACKAGE_PATH)/controleur/Startup.class - -build/$(PACKAGE_PATH)/controleur/ChoiceValidation.class : src/$(PACKAGE_PATH)/controleur/ChoiceValidation.java build/$(PACKAGE_PATH)/View/Fenetre.class - javac $(JAVAC_OPT) src/$(PACKAGE_PATH)/controleur/ChoiceValidation.java - -build/$(PACKAGE_PATH)/controleur/Navigation.class : src/$(PACKAGE_PATH)/controleur/Navigation.java - javac $(JAVAC_OPT) src/$(PACKAGE_PATH)/controleur/Navigation.java - -build/$(PACKAGE_PATH)/controleur/Startup.class : src/$(PACKAGE_PATH)/controleur/Startup.java - javac $(JAVAC_OPT) src/$(PACKAGE_PATH)/controleur/Startup.java +testGrille : build/$(PACKAGE_PATH)/View/TestGrille.class + java -cp build $(PACKAGE).View.TestGrille clear : rm -rf build/* diff --git a/projetAgile/Main.java b/projetAgile/src/fr/iutfbleau/projetAgile/Main.java similarity index 100% rename from projetAgile/Main.java rename to projetAgile/src/fr/iutfbleau/projetAgile/Main.java diff --git a/projetAgile/src/fr/iutfbleau/projetAgile/Utils.java b/projetAgile/src/fr/iutfbleau/projetAgile/Utils/Utils.java similarity index 90% rename from projetAgile/src/fr/iutfbleau/projetAgile/Utils.java rename to projetAgile/src/fr/iutfbleau/projetAgile/Utils/Utils.java index 310cab2..53b9e5b 100644 --- a/projetAgile/src/fr/iutfbleau/projetAgile/Utils.java +++ b/projetAgile/src/fr/iutfbleau/projetAgile/Utils/Utils.java @@ -1,3 +1,5 @@ +package fr.iutfbleau.projetAgile.Utils; + import java.awt.Color; public class Utils { diff --git a/projetAgile/src/fr/iutfbleau/projetAgile/View/Grille.java b/projetAgile/src/fr/iutfbleau/projetAgile/View/Grille.java index 58c4c2f..94230c4 100644 --- a/projetAgile/src/fr/iutfbleau/projetAgile/View/Grille.java +++ b/projetAgile/src/fr/iutfbleau/projetAgile/View/Grille.java @@ -1,4 +1,7 @@ +package fr.iutfbleau.projetAgile.View; + import javax.swing.*; +import fr.iutfbleau.projetAgile.Utils.Utils; import java.awt.*; public class Grille extends JPanel { diff --git a/projetAgile/src/fr/iutfbleau/projetAgile/View/Pion.java b/projetAgile/src/fr/iutfbleau/projetAgile/View/Pion.java index 34b1a83..21d8a52 100644 --- a/projetAgile/src/fr/iutfbleau/projetAgile/View/Pion.java +++ b/projetAgile/src/fr/iutfbleau/projetAgile/View/Pion.java @@ -1,5 +1,8 @@ +package fr.iutfbleau.projetAgile.View; + import java.awt.*; import javax.swing.*; +import fr.iutfbleau.projetAgile.Utils.Utils; public class Pion extends JComponent{ diff --git a/projetAgile/src/fr/iutfbleau/projetAgile/View/Fenetre.java b/projetAgile/src/fr/iutfbleau/projetAgile/View/TestGrille.java similarity index 79% rename from projetAgile/src/fr/iutfbleau/projetAgile/View/Fenetre.java rename to projetAgile/src/fr/iutfbleau/projetAgile/View/TestGrille.java index 387c762..4bd45a9 100644 --- a/projetAgile/src/fr/iutfbleau/projetAgile/View/Fenetre.java +++ b/projetAgile/src/fr/iutfbleau/projetAgile/View/TestGrille.java @@ -1,8 +1,10 @@ +package fr.iutfbleau.projetAgile.View; + import javax.swing.*; import java.awt.*; -public class Fenetre extends JFrame{ - public Fenetre() { +public class TestGrille extends JFrame{ + public TestGrille() { super("Puissance 4"); this.setLayout(new GridBagLayout()); Grille g = new Grille(); @@ -24,4 +26,8 @@ public class Fenetre extends JFrame{ this.setVisible(true); g.requestFocusInWindow(); } + + public static void main(String[] args) { + TestGrille v = new TestGrille(); + } }