From 3bd9aa0fdcb06ac921225fc1a5f3306a7985a2c8 Mon Sep 17 00:00:00 2001 From: martins Date: Wed, 19 Oct 2022 22:12:11 +0200 Subject: [PATCH] ok --- projetAgile/Makefile | 21 ++- projetAgile/Makefile~ | 124 ++++++++++++++++++ .../projetAgile/View/TestGrille.java | 1 + 3 files changed, 144 insertions(+), 2 deletions(-) create mode 100644 projetAgile/Makefile~ diff --git a/projetAgile/Makefile b/projetAgile/Makefile index ad1d038..ae8376b 100644 --- a/projetAgile/Makefile +++ b/projetAgile/Makefile @@ -9,7 +9,9 @@ JAR_OPTION = cvfe projetAgile.jar $(PACKAGE).main.Main -C build fr -C res View = build/$(PACKAGE_PATH)/View/Pion.class \ build/$(PACKAGE_PATH)/View/Grille.class \ build/$(PACKAGE_PATH)/View/Puissance4Panel.class \ - build/$(PACKAGE_PATH)/View/TestGrille.class + build/$(PACKAGE_PATH)/View/TestGrille.class \ + build/$(PACKAGE_PATH)/View/BoutonsMenu.class \ + build/$(PACKAGE_PATH)/View/Menu.class Utils = build/$(PACKAGE_PATH)/Utils/Constants.class \ build/$(PACKAGE_PATH)/Utils/GameStatus.class @@ -59,6 +61,10 @@ build/$(PACKAGE_PATH)/Controller/ModelEventListener.class : src/$(PACKAGE_PATH)/ javac $(JAVAC_OPT) $< +build/$(PACKAGE_PATH)/Controller/ObservateurMenuSouris.class : src/$(PACKAGE_PATH)/Controller/ObservateurMenuSouris.java \ + build/$(PACKAGE_PATH)/View/BoutonsMenu.class + javac $(JAVAC_OPT) $< + #------- Modele ------ build/$(PACKAGE_PATH)/Model/GrilleModel.class : src/$(PACKAGE_PATH)/Model/GrilleModel.java \ @@ -95,9 +101,17 @@ build/$(PACKAGE_PATH)/View/Puissance4Panel.class : src/$(PACKAGE_PATH)/View/Pui build/$(PACKAGE_PATH)/View/TestGrille.class : src/$(PACKAGE_PATH)/View/TestGrille.java \ build/$(PACKAGE_PATH)/View/Puissance4Panel.class \ build/$(PACKAGE_PATH)/Model/GrilleModel.class \ - build/$(PACKAGE_PATH)/Controller/GrilleMouseListener.class + build/$(PACKAGE_PATH)/Controller/GrilleMouseListener.class \ + build/$(PACKAGE_PATH)/View/Menu.class javac $(JAVAC_OPT) $< +build/$(PACKAGE_PATH)/View/BoutonsMenu.class : src/$(PACKAGE_PATH)/View/BoutonsMenu.java + javac $(JAVAC_OPT) $< + +build/$(PACKAGE_PATH)/View.Menu.class : src/$(PACKAGE_PATH)/View/Menu.java \ + build/$(PACKAGE_PATH)/View/BoutonsMenu.class \ + build/$(PACKAGE_PATH)/Controller/ObservateurMenuSouris.class + javac $(JAVAC_OPT) $< testGrille : build/$(PACKAGE_PATH)/View/TestGrille.class @@ -108,3 +122,6 @@ puissance4 : build/$(PACKAGE_PATH)/View/Puissance4Panel.class clear : rm -rf build/* + +.PHONY: + clear diff --git a/projetAgile/Makefile~ b/projetAgile/Makefile~ new file mode 100644 index 0000000..25799e8 --- /dev/null +++ b/projetAgile/Makefile~ @@ -0,0 +1,124 @@ +JAVAC_OPT = -implicit:none \ + -d build -classpath build -sourcepath src +PACKAGE = fr.iutfbleau.projetAgile +PACKAGE_PATH = fr/iutfbleau/projetAgile +JAR_OPTION = cvfe projetAgile.jar $(PACKAGE).main.Main -C build fr -C res + +#------- Dossiers ------ + +View = build/$(PACKAGE_PATH)/View/Pion.class \ + build/$(PACKAGE_PATH)/View/Grille.class \ + build/$(PACKAGE_PATH)/View/Puissance4Panel.class \ + build/$(PACKAGE_PATH)/View/TestGrille.class \ + build/$(PACKAGE_PATH)/View/BoutonsMenu.class \ + build/$(PACKAGE_PATH)/View/Menu.class + +Utils = build/$(PACKAGE_PATH)/Utils/Constants.class \ + build/$(PACKAGE_PATH)/Utils/GameStatus.class + +Events = build/$(PACKAGE_PATH)/Event/GridChangedListener.class \ + build/$(PACKAGE_PATH)/Event/GridEvent.class \ + build/$(PACKAGE_PATH)/Event/PlayerEvent.class + +Model = build/$(PACKAGE_PATH)/Model/GrilleModel.class + +Controller = build/$(PACKAGE_PATH)/Controller/GrilleMouseListener.class \ + build/$(PACKAGE_PATH)/Controller/ModelEventListener.class +#------- Events ------ + +build/$(PACKAGE_PATH)/Event/PlayerEvent.class : src/$(PACKAGE_PATH)/Event/PlayerEvent.java + javac $(JAVAC_OPT) $< + +build/$(PACKAGE_PATH)/Event/GridEvent.class : src/$(PACKAGE_PATH)/Event/GridEvent.java + javac $(JAVAC_OPT) $< + +build/$(PACKAGE_PATH)/Event/GridChangedListener.class : src/$(PACKAGE_PATH)/Event/GridChangedListener.java \ + build/$(PACKAGE_PATH)/Event/GridEvent.class \ + build/$(PACKAGE_PATH)/Event/PlayerEvent.class + javac $(JAVAC_OPT) $< + +build/$(PACKAGE_PATH)/Event/AbstractGridInitiater.class : src/$(PACKAGE_PATH)/Event/AbstractGridInitiater.java \ + $(Events) + javac $(JAVAC_OPT) $< + +#------- Controleur ------ + +build/$(PACKAGE_PATH)/Controller/ResetGame.class : src/$(PACKAGE_PATH)/Controller/ResetGame.java \ + build/$(PACKAGE_PATH)/View/Grille.class \ + build/$(PACKAGE_PATH)/Model/GrilleModel.class + javac $(JAVAC_OPT) $< + +build/$(PACKAGE_PATH)/Controller/GrilleMouseListener.class : src/$(PACKAGE_PATH)/Controller/GrilleMouseListener.java \ + build/$(PACKAGE_PATH)/View/Grille.class \ + build/$(PACKAGE_PATH)/Model/GrilleModel.class \ + build/$(PACKAGE_PATH)/Utils/GameStatus.class + javac $(JAVAC_OPT) $< + +build/$(PACKAGE_PATH)/Controller/ModelEventListener.class : src/$(PACKAGE_PATH)/Controller/ModelEventListener.java \ + build/$(PACKAGE_PATH)/Event/GridChangedListener.class \ + build/$(PACKAGE_PATH)/View/Grille.class \ + $(Event) + + javac $(JAVAC_OPT) $< + +build/$(PACKAGE_PATH)/Controller/ObservateurMenuSouris.class : src/$(PACKAGE_PATH)/Controller/ObservateurMenuSouris.java \ + build/$(PACKAGE_PATH)/View/BoutonsMenu.class + javac $(JAVAC_OPT) $< + +#------- Modele ------ + +build/$(PACKAGE_PATH)/Model/GrilleModel.class : src/$(PACKAGE_PATH)/Model/GrilleModel.java \ + build/$(PACKAGE_PATH)/Event/AbstractGridInitiater.class \ + $(Utils) + javac $(JAVAC_OPT) $< + +#------- Utils ------ + +build/$(PACKAGE_PATH)/Utils/Constants.class : src/$(PACKAGE_PATH)/Utils/Constants.java + javac $(JAVAC_OPT) $< + +build/$(PACKAGE_PATH)/Utils/GameStatus.class : src/$(PACKAGE_PATH)/Utils/GameStatus.java + javac $(JAVAC_OPT) $< + +#------- Vue ------ + +build/$(PACKAGE_PATH)/View/Pion.class : src/$(PACKAGE_PATH)/View/Pion.java \ + build/$(PACKAGE_PATH)/Utils/Constants.class + javac $(JAVAC_OPT) $< + +build/$(PACKAGE_PATH)/View/Grille.class : src/$(PACKAGE_PATH)/View/Grille.java \ + build/$(PACKAGE_PATH)/View/Pion.class \ + build/$(PACKAGE_PATH)/Utils/Constants.class + javac $(JAVAC_OPT) $< + +build/$(PACKAGE_PATH)/View/Puissance4Panel.class : src/$(PACKAGE_PATH)/View/Puissance4Panel.java \ + build/$(PACKAGE_PATH)/View/Pion.class \ + build/$(PACKAGE_PATH)/View/Grille.class \ + build/$(PACKAGE_PATH)/Controller/ResetGame.class \ + $(Controller) + javac $(JAVAC_OPT) $< + +build/$(PACKAGE_PATH)/View/TestGrille.class : src/$(PACKAGE_PATH)/View/TestGrille.java \ + build/$(PACKAGE_PATH)/View/Puissance4Panel.class \ + build/$(PACKAGE_PATH)/Model/GrilleModel.class \ + build/$(PACKAGE_PATH)/Controller/GrilleMouseListener.class \ + build/$(PACKAGE_PATH)/View/Menu.class + javac $(JAVAC_OPT) $< + +build/$(PACKAGE_PATH)/View/BoutonsMenu.class : src/$(PACKAGE_PATH)/View/BoutonsMenu.java + javac $(JAVAC_OPT) $< + +build/$(PACKAGE_PATH)/View.Menu.class : src/$(PACKAGE_PATH)/View/Menu.java \ + build/$(PACKAGE_PATH)/View/BoutonsMenu.class \ + build/$(PACKAGE_PATH)/Controller/ObservateurMenuSouris.class + javac $(JAVAC_OPT) $< + + +testGrille : build/$(PACKAGE_PATH)/View/TestGrille.class + java -cp build $(PACKAGE).View.TestGrille + +puissance4 : build/$(PACKAGE_PATH)/View/Puissance4Panel.class + java -cp build $(PACKAGE).View.Puissance4Panel + +clear : + rm -rf build/* diff --git a/projetAgile/src/fr/iutfbleau/projetAgile/View/TestGrille.java b/projetAgile/src/fr/iutfbleau/projetAgile/View/TestGrille.java index 6bdd201..753659c 100644 --- a/projetAgile/src/fr/iutfbleau/projetAgile/View/TestGrille.java +++ b/projetAgile/src/fr/iutfbleau/projetAgile/View/TestGrille.java @@ -13,6 +13,7 @@ public class TestGrille extends JFrame{ Grille g = new Grille(); GrilleModel gm = new GrilleModel(); GrilleMouseListener listener = new GrilleMouseListener(g, gm); + this.add(new Menu()); this.add(g); this.setLocation(200, 200); this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);