This commit is contained in:
martins 2022-10-19 22:12:11 +02:00
parent 4fdd34dca2
commit 3bd9aa0fdc
3 changed files with 144 additions and 2 deletions

View File

@ -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

124
projetAgile/Makefile~ Normal file
View File

@ -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/*

View File

@ -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);