From 79ce76af7842aae416276626174e365eee66e588 Mon Sep 17 00:00:00 2001 From: Justine Yannis Date: Mon, 24 Oct 2022 20:41:53 +0200 Subject: [PATCH] Fichier temporaire makefile suppression --- projetAgile/Makefile~ | 137 -------------------------------------- projetAgile/src/test.java | 18 +++++ 2 files changed, 18 insertions(+), 137 deletions(-) delete mode 100644 projetAgile/Makefile~ create mode 100644 projetAgile/src/test.java diff --git a/projetAgile/Makefile~ b/projetAgile/Makefile~ deleted file mode 100644 index 7be95cb..0000000 --- a/projetAgile/Makefile~ +++ /dev/null @@ -1,137 +0,0 @@ -JAVAC_OPT = -implicit:none \ - -d build -classpath build -sourcepath src -PACKAGE = fr.iutfbleau.projetAgile -PACKAGE_PATH = fr/iutfbleau/projetAgile - -#------- Variables ------ - -View = build/$(PACKAGE_PATH)/View/Pion.class \ - build/$(PACKAGE_PATH)/View/Grille.class \ - build/$(PACKAGE_PATH)/View/Puissance4Panel.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 \ - 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 ------ - -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 - javac $(JAVAC_OPT) $< - -build/$(PACKAGE_PATH)/Controller/GrilleMouseListener.class : src/$(PACKAGE_PATH)/Controller/GrilleMouseListener.java - 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 \ - build/$(PACKAGE_PATH)/Utils/Constants.class - javac $(JAVAC_OPT) $< - -build/$(PACKAGE_PATH)/Controller/Puissance4Controller.class : src/$(PACKAGE_PATH)/Controller/Puissance4Controller.java \ - build/$(PACKAGE_PATH)/Model/GrilleModel.class \ - build/$(PACKAGE_PATH)/View/Grille.class \ - build/$(PACKAGE_PATH)/Utils/GameStatus.class \ - build/$(PACKAGE_PATH)/View/Puissance4Panel.class \ - $(Controller) - 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)/Utils/Constants.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)/Controller/ObservateurMenuSouris.class \ - build/$(PACKAGE_PATH)/View/BoutonsMenu.class \ - build/$(PACKAGE_PATH)/Utils/Constants.class - javac $(JAVAC_OPT) $< - - -build/$(PACKAGE_PATH)/Main.class : src/$(PACKAGE_PATH)/Main.java \ - build/$(PACKAGE_PATH)/View/Menu.class \ - build/$(PACKAGE_PATH)/Controller/Puissance4Controller.class \ - build/$(PACKAGE_PATH)/View/Grille.class \ - build/$(PACKAGE_PATH)/Model/GrilleModel.class - javac $(JAVAC_OPT) $< - - -# BUT FACTICES: -.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/test.java b/projetAgile/src/test.java new file mode 100644 index 0000000..707274f --- /dev/null +++ b/projetAgile/src/test.java @@ -0,0 +1,18 @@ +JTextField field1 = new JTextField("Joueur 1"); +JTextField field2 = new JTextField("Joueur 2"); +Object[] message = { + "Entrez le nom du joueur 1", field1, + "Entrez le nom du joueur 2:", field2, +}; +int choix = JOptionPane.showConfirmDialog(this, message, "Entrez les noms des joueurs", JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE); +if (choix == JOptionPane.OK_OPTION) +{ + try { + String J1 = field1.getText(); + String J2 = field2.getText(); + //Lancer la fonction de la classe Puissance4 + } catch (Exception e) { + + } +} +} \ No newline at end of file