diff --git a/projetAgile/Makefile b/projetAgile/Makefile index 21581db..ec633bb 100644 --- a/projetAgile/Makefile +++ b/projetAgile/Makefile @@ -2,16 +2,8 @@ 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 -#BUT PAR DEFAUT -run: ArgileGames.jar - java -jar ArgileGames.jar - -ArgileGames.jar : build/$(PACKAGE_PATH)/Main.class - jar cvfe ArgileGames.jar $(PACKAGE_PATH).Main -C build fr -C res images - -#------- Dossiers ------ +#------- Variables ------ View = build/$(PACKAGE_PATH)/View/Pion.class \ build/$(PACKAGE_PATH)/View/Grille.class \ @@ -29,7 +21,12 @@ Events = build/$(PACKAGE_PATH)/Event/GridChangedListener.class \ Model = build/$(PACKAGE_PATH)/Model/GrilleModel.class Controller = build/$(PACKAGE_PATH)/Controller/GrilleMouseListener.class \ - build/$(PACKAGE_PATH)/Controller/ModelEventListener.class + build/$(PACKAGE_PATH)/Controller/ModelEventListener.class \ + build/$(PACKAGE_PATH)/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 #------- Events ------ @@ -104,7 +101,6 @@ build/$(PACKAGE_PATH)/View/Grille.class : src/$(PACKAGE_PATH)/View/Grille.java \ 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 \ build/$(PACKAGE_PATH)/Utils/Constants.class javac $(JAVAC_OPT) $< @@ -126,11 +122,13 @@ build/$(PACKAGE_PATH)/Main.class : src/$(PACKAGE_PATH)/Main.java \ # BUT FACTICES: -.PHONY: clear doc +.PHONY: clear doc run doc : javadoc -d doc src/$(PACKAGE_PATH)/View/*.java src/$(PACKAGE_PATH)/Controller/*.java src/$(PACKAGE_PATH)/Utils/*.java src/$(PACKAGE_PATH)/Model/*.java src/$(PACKAGE_PATH)/Event/*.java +run: ArgileGames.jar + java -jar ArgileGames.jar clear : rm -rf build/* diff --git a/projetAgile/src/fr/iutfbleau/projetAgile/View/Menu.java b/projetAgile/src/fr/iutfbleau/projetAgile/View/Menu.java index 55450c4..9fc80c8 100644 --- a/projetAgile/src/fr/iutfbleau/projetAgile/View/Menu.java +++ b/projetAgile/src/fr/iutfbleau/projetAgile/View/Menu.java @@ -145,6 +145,7 @@ public abstract class Menu{ public static JFrame getFrame(){ if(Menu.frame.getLayout()!=Menu.cd){ Menu.frame.setLayout(Menu.cd); + Menu.frame.setMinimumSize(new Dimension(1280,720)); } return Menu.frame; } diff --git a/projetAgile/src/fr/iutfbleau/projetAgile/View/Puissance4Panel.java b/projetAgile/src/fr/iutfbleau/projetAgile/View/Puissance4Panel.java index 97f29b6..a991244 100644 --- a/projetAgile/src/fr/iutfbleau/projetAgile/View/Puissance4Panel.java +++ b/projetAgile/src/fr/iutfbleau/projetAgile/View/Puissance4Panel.java @@ -4,7 +4,7 @@ import javax.swing.*; import javax.swing.border.EmptyBorder; import java.awt.*; -import fr.iutfbleau.projetAgile.Controller.ResetGame; +import java.awt.event.ActionListener; import fr.iutfbleau.projetAgile.Utils.Constants; public class Puissance4Panel extends JPanel{ @@ -34,7 +34,7 @@ public class Puissance4Panel extends JPanel{ gbc.anchor = GridBagConstraints.CENTER; gbc.gridwidth = 1; gbc.gridheight = 1; - gbc.weightx = 1; + gbc.weightx = 0; gbc.weighty = 0; gbc.insets = new Insets(0, 0, 0, 0); @@ -102,7 +102,7 @@ public class Puissance4Panel extends JPanel{ return grille; } - public void addResetListener(ResetGame l) { + public void addResetListener(ActionListener l) { this.reset.addActionListener(l); }