diff --git a/projetAgile/Makefile b/projetAgile/Makefile index 6c29bbe..392eb06 100644 --- a/projetAgile/Makefile +++ b/projetAgile/Makefile @@ -1,4 +1,4 @@ -JAVAC_OPT = -implicit:none \ +@JAVAC_OPT = -implicit:none \ -d build -classpath build -sourcepath src PACKAGE = fr.iutfbleau.projetAgile PACKAGE_PATH = fr/iutfbleau/projetAgile @@ -23,44 +23,46 @@ Controller = build/$(PACKAGE_PATH)/Puissance4/Controller/GrilleMouseListener.cla build/$(PACKAGE_PATH)/Puissance4/Controller/ResetGame.class #BUT PAR DEFAUT -ArgileGames.jar : build/$(PACKAGE_PATH)/Main.class - jar cvfe ArgileGames.jar $(PACKAGE_PATH).Main -C build fr -C res images +ArgileGames.jar : build/$(PACKAGE_PATH)/Main.class + @echo "Creating jar..." + @jar cfe ArgileGames.jar $(PACKAGE_PATH).Main -C build fr -C res images + @echo "Finished" #------- Events ------ build/$(PACKAGE_PATH)/Puissance4/Event/GridEvent.class : src/$(PACKAGE_PATH)/Puissance4/Event/GridEvent.java - javac $(JAVAC_OPT) $< + @javac $(@JAVAC_OPT) $< build/$(PACKAGE_PATH)/Puissance4/Event/StatusEvent.class : src/$(PACKAGE_PATH)/Puissance4/Event/StatusEvent.java \ build/$(PACKAGE_PATH)/Puissance4/Utils/GameStatus.class - javac $(JAVAC_OPT) $< + @javac $(@JAVAC_OPT) $< build/$(PACKAGE_PATH)/Puissance4/Event/GridChangedListener.class : src/$(PACKAGE_PATH)/Puissance4/Event/GridChangedListener.java \ build/$(PACKAGE_PATH)/Puissance4/Event/GridEvent.class - javac $(JAVAC_OPT) $< + @javac $(@JAVAC_OPT) $< build/$(PACKAGE_PATH)/Puissance4/Event/AbstractGridInitiater.class : src/$(PACKAGE_PATH)/Puissance4/Event/AbstractGridInitiater.java \ $(Events) - javac $(JAVAC_OPT) $< + @javac $(@JAVAC_OPT) $< #------- Controleur ------ build/$(PACKAGE_PATH)/Puissance4/Controller/ResetGame.class : src/$(PACKAGE_PATH)/Puissance4/Controller/ResetGame.java - javac $(JAVAC_OPT) $< + @javac $(@JAVAC_OPT) $< build/$(PACKAGE_PATH)/Puissance4/Controller/GrilleMouseListener.class : src/$(PACKAGE_PATH)/Puissance4/Controller/GrilleMouseListener.java - javac $(JAVAC_OPT) $< + @javac $(@JAVAC_OPT) $< build/$(PACKAGE_PATH)/Puissance4/Controller/ModelEventListener.class : src/$(PACKAGE_PATH)/Puissance4/Controller/ModelEventListener.java \ build/$(PACKAGE_PATH)/Puissance4/Event/GridChangedListener.class \ build/$(PACKAGE_PATH)/Puissance4/View/Grille.class \ $(Event) - javac $(JAVAC_OPT) $< + @javac $(@JAVAC_OPT) $< build/$(PACKAGE_PATH)/Menu/Controller/ObservateurMenuSouris.class : src/$(PACKAGE_PATH)/Menu/Controller/ObservateurMenuSouris.java \ build/$(PACKAGE_PATH)/Menu/View/BoutonsMenu.class - javac $(JAVAC_OPT) $< + @javac $(@JAVAC_OPT) $< build/$(PACKAGE_PATH)/Puissance4/Controller/Puissance4Controller.class : src/$(PACKAGE_PATH)/Puissance4/Controller/Puissance4Controller.java \ build/$(PACKAGE_PATH)/Puissance4/Model/GrilleModel.class \ @@ -68,47 +70,47 @@ build/$(PACKAGE_PATH)/Puissance4/Controller/Puissance4Controller.class : src/$(P build/$(PACKAGE_PATH)/Puissance4/Utils/GameStatus.class \ build/$(PACKAGE_PATH)/Puissance4/View/Puissance4Panel.class \ $(Controller) - javac $(JAVAC_OPT) $< + @javac $(@JAVAC_OPT) $< #------- Modele ------ build/$(PACKAGE_PATH)/Puissance4/Model/GrilleModel.class : src/$(PACKAGE_PATH)/Puissance4/Model/GrilleModel.java \ build/$(PACKAGE_PATH)/Puissance4/Event/AbstractGridInitiater.class \ $(Utils) - javac $(JAVAC_OPT) $< + @javac $(@JAVAC_OPT) $< #------- Utils ------ build/$(PACKAGE_PATH)/Puissance4/Utils/Constants.class : src/$(PACKAGE_PATH)/Puissance4/Utils/Constants.java - javac $(JAVAC_OPT) $< + @javac $(@JAVAC_OPT) $< build/$(PACKAGE_PATH)/Puissance4/Utils/GameStatus.class : src/$(PACKAGE_PATH)/Puissance4/Utils/GameStatus.java - javac $(JAVAC_OPT) $< + @javac $(@JAVAC_OPT) $< #------- Vue ------ build/$(PACKAGE_PATH)/Puissance4/View/Pion.class : src/$(PACKAGE_PATH)/Puissance4/View/Pion.java \ build/$(PACKAGE_PATH)/Puissance4/Utils/Constants.class - javac $(JAVAC_OPT) $< + @javac $(@JAVAC_OPT) $< build/$(PACKAGE_PATH)/Puissance4/View/Grille.class : src/$(PACKAGE_PATH)/Puissance4/View/Grille.java \ build/$(PACKAGE_PATH)/Puissance4/View/Pion.class \ build/$(PACKAGE_PATH)/Puissance4/Utils/Constants.class - javac $(JAVAC_OPT) $< + @javac $(@JAVAC_OPT) $< build/$(PACKAGE_PATH)/Puissance4/View/Puissance4Panel.class : src/$(PACKAGE_PATH)/Puissance4/View/Puissance4Panel.java \ build/$(PACKAGE_PATH)/Puissance4/View/Pion.class \ build/$(PACKAGE_PATH)/Puissance4/View/Grille.class \ build/$(PACKAGE_PATH)/Puissance4/Utils/Constants.class - javac $(JAVAC_OPT) $< + @javac $(@JAVAC_OPT) $< build/$(PACKAGE_PATH)/Menu/View/BoutonsMenu.class : src/$(PACKAGE_PATH)/Menu/View/BoutonsMenu.java - javac $(JAVAC_OPT) $< + @javac $(@JAVAC_OPT) $< build/$(PACKAGE_PATH)/Menu/View/Menu.class : src/$(PACKAGE_PATH)/Menu/View/Menu.java \ build/$(PACKAGE_PATH)/Menu/Controller/ObservateurMenuSouris.class \ build/$(PACKAGE_PATH)/Menu/View/BoutonsMenu.class - javac $(JAVAC_OPT) $< + @javac $(@JAVAC_OPT) $< build/$(PACKAGE_PATH)/Main.class : src/$(PACKAGE_PATH)/Main.java \ @@ -116,24 +118,27 @@ build/$(PACKAGE_PATH)/Main.class : src/$(PACKAGE_PATH)/Main.java \ build/$(PACKAGE_PATH)/Puissance4/Controller/Puissance4Controller.class \ build/$(PACKAGE_PATH)/Puissance4/View/Grille.class \ build/$(PACKAGE_PATH)/Puissance4/Model/GrilleModel.class - javac $(JAVAC_OPT) $< + @echo "Classes compiled" + @javac $(@JAVAC_OPT) $< # BUT FACTICES: .PHONY: clear doc run doc : - javadoc -verbose -d doc src/$(PACKAGE_PATH)/Puissance4/View/*.java \ + @echo "Creating documentation..." + @javadoc -quiet -d doc src/$(PACKAGE_PATH)/Puissance4/View/*.java \ src/$(PACKAGE_PATH)/Menu/View/*.java \ src/$(PACKAGE_PATH)/Puissance4/Controller/*.java \ src/$(PACKAGE_PATH)/Menu/Controller/*.java \ src/$(PACKAGE_PATH)/Puissance4/Utils/*.java \ src/$(PACKAGE_PATH)/Puissance4/Model/*.java \ src/$(PACKAGE_PATH)/Puissance4/Event/*.java + @echo "Finished" run: ArgileGames.jar - java -jar ArgileGames.jar + @java -jar ArgileGames.jar clear : - rm -rf build/* + @rm -rf build/* diff --git a/projetAgile/src/fr/iutfbleau/projetAgile/Puissance4/Event/AbstractGridInitiater.java b/projetAgile/src/fr/iutfbleau/projetAgile/Puissance4/Event/AbstractGridInitiater.java index bd61921..359a289 100644 --- a/projetAgile/src/fr/iutfbleau/projetAgile/Puissance4/Event/AbstractGridInitiater.java +++ b/projetAgile/src/fr/iutfbleau/projetAgile/Puissance4/Event/AbstractGridInitiater.java @@ -47,10 +47,10 @@ public abstract class AbstractGridInitiater { } /** - * Notifie tous les listeners lorsque le tour du joueur change - * @param oldPlayer L'ancien joueur qui jouait - * @param newPlayer Le nouveau joueur qui joue - */ + * Notifie tous les listeners lorsque le joueur change + * @param status + * @param playerTurn + */ protected void firePlayerChanged(GameStatus status, int playerTurn) { StatusEvent event = null; for(GridChangedListener listener : getGridListeners()) {