Changement de dossier pour les évènements personnalisés, vérification du makefile et de chaque dépendances, ajout de variables pour raccourcir certaines dépendances, séparation du listener et de grille
This commit is contained in:
parent
e8a2d78379
commit
ff85129e62
@ -6,58 +6,58 @@ JAR_OPTION = cvfe projetAgile.jar $(PACKAGE).main.Main -C build fr -C res
|
||||
|
||||
#------- Dossiers ------
|
||||
|
||||
View : build/$(PACKAGE_PATH)/View/Pion.class \
|
||||
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
|
||||
|
||||
Utils : build/$(PACKAGE_PATH)/Utils/Constants.class
|
||||
Utils = build/$(PACKAGE_PATH)/Utils/Constants.class \
|
||||
build/$(PACKAGE_PATH)/Utils/GameStatus.class
|
||||
|
||||
Events : build/$(PACKAGE_PATH)/Controller/EventListener/GridChangedListener.class \
|
||||
build/$(PACKAGE_PATH)/Controller/EventListener/GridEvent.class \
|
||||
build/$(PACKAGE_PATH)/Controller/EventListener/PlayerEvent.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
|
||||
Model = build/$(PACKAGE_PATH)/Model/GrilleModel.class
|
||||
|
||||
Controller : build/$(PACKAGE_PATH)/Controller/GrilleMouseListener.class \
|
||||
Controller = build/$(PACKAGE_PATH)/Controller/GrilleMouseListener.class \
|
||||
build/$(PACKAGE_PATH)/Controller/ModelEventListener.class
|
||||
#------- Events ------
|
||||
|
||||
build/$(PACKAGE_PATH)/Controller/EventListener/PlayerEvent.class : src/$(PACKAGE_PATH)/Controller/EventListener/PlayerEvent.java
|
||||
build/$(PACKAGE_PATH)/Event/PlayerEvent.class : src/$(PACKAGE_PATH)/Event/PlayerEvent.java
|
||||
javac $(JAVAC_OPT) $<
|
||||
|
||||
build/$(PACKAGE_PATH)/Controller/EventListener/GridEvent.class : src/$(PACKAGE_PATH)/Controller/EventListener/GridEvent.java
|
||||
build/$(PACKAGE_PATH)/Event/GridEvent.class : src/$(PACKAGE_PATH)/Event/GridEvent.java
|
||||
javac $(JAVAC_OPT) $<
|
||||
|
||||
build/$(PACKAGE_PATH)/Controller/EventListener/GridChangedListener.class : src/$(PACKAGE_PATH)/Controller/EventListener/GridChangedListener.java \
|
||||
build/$(PACKAGE_PATH)/Controller/EventListener/GridEvent.class \
|
||||
build/$(PACKAGE_PATH)/Controller/EventListener/PlayerEvent.class
|
||||
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)/Controller/EventListener/AbstractGridInitiater.class : src/$(PACKAGE_PATH)/Controller/EventListener/AbstractGridInitiater.java \
|
||||
build/$(PACKAGE_PATH)/Controller/EventListener/GridChangedListener.class \
|
||||
build/$(PACKAGE_PATH)/Controller/EventListener/GridEvent.class \
|
||||
build/$(PACKAGE_PATH)/Controller/EventListener/PlayerEvent.class
|
||||
build/$(PACKAGE_PATH)/Event/AbstractGridInitiater.class : src/$(PACKAGE_PATH)/Event/AbstractGridInitiater.java \
|
||||
$(Events)
|
||||
javac $(JAVAC_OPT) $<
|
||||
|
||||
#------- Controleur ------
|
||||
|
||||
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)/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)/Controller/EventListener/GridChangedListener.class \
|
||||
build/$(PACKAGE_PATH)/Controller/EventListener/GridEvent.class \
|
||||
build/$(PACKAGE_PATH)/Controller/EventListener/PlayerEvent.class \
|
||||
build/$(PACKAGE_PATH)/Event/GridChangedListener.class \
|
||||
$(Event)
|
||||
build/$(PACKAGE_PATH)/View/Grille.class
|
||||
javac $(JAVAC_OPT) $<
|
||||
|
||||
#------- Modele ------
|
||||
|
||||
build/$(PACKAGE_PATH)/Model/GrilleModel.class : src/$(PACKAGE_PATH)/Model/GrilleModel.java \
|
||||
build/$(PACKAGE_PATH)/Controller/EventListener/AbstractGridInitiater.class
|
||||
build/$(PACKAGE_PATH)/Event/AbstractGridInitiater.class \
|
||||
$(Utils)
|
||||
javac $(JAVAC_OPT) $<
|
||||
|
||||
#------- Utils ------
|
||||
@ -65,6 +65,9 @@ build/$(PACKAGE_PATH)/Model/GrilleModel.class : src/$(PACKAGE_PATH)/Model/Grille
|
||||
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 \
|
||||
@ -78,7 +81,8 @@ 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)/View/Grille.class \
|
||||
$(Controller)
|
||||
javac $(JAVAC_OPT) $<
|
||||
|
||||
build/$(PACKAGE_PATH)/View/TestGrille.class : src/$(PACKAGE_PATH)/View/TestGrille.java \
|
||||
@ -89,10 +93,10 @@ build/$(PACKAGE_PATH)/View/TestGrille.class : src/$(PACKAGE_PATH)/View/TestGril
|
||||
|
||||
|
||||
|
||||
testGrille : Controller Model View Utils Events
|
||||
testGrille : build/$(PACKAGE_PATH)/View/TestGrille.class
|
||||
java -cp build $(PACKAGE).View.TestGrille
|
||||
|
||||
puissance4 : Controller Model View Utils Events
|
||||
puissance4 : build/$(PACKAGE_PATH)/View/Puissance4Panel.class
|
||||
java -cp build $(PACKAGE).View.Puissance4Panel
|
||||
|
||||
clear :
|
||||
|
@ -4,7 +4,7 @@ import java.awt.event.MouseEvent;
|
||||
import javax.swing.event.MouseInputAdapter;
|
||||
import fr.iutfbleau.projetAgile.Model.GrilleModel;
|
||||
import fr.iutfbleau.projetAgile.View.Grille;
|
||||
import static fr.iutfbleau.projetAgile.Utils.Constants.GameStatus.*;
|
||||
import static fr.iutfbleau.projetAgile.Utils.GameStatus.*;
|
||||
|
||||
public class GrilleMouseListener extends MouseInputAdapter{
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package fr.iutfbleau.projetAgile.Controller;
|
||||
|
||||
import fr.iutfbleau.projetAgile.Controller.EventListener.*;
|
||||
import fr.iutfbleau.projetAgile.Event.*;
|
||||
import fr.iutfbleau.projetAgile.Utils.Constants;
|
||||
import fr.iutfbleau.projetAgile.View.Grille;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
package fr.iutfbleau.projetAgile.Controller.EventListener;
|
||||
package fr.iutfbleau.projetAgile.Event;
|
||||
import javax.swing.event.EventListenerList;
|
||||
|
||||
public abstract class AbstractGridInitiater {
|
@ -1,4 +1,4 @@
|
||||
package fr.iutfbleau.projetAgile.Controller.EventListener;
|
||||
package fr.iutfbleau.projetAgile.Event;
|
||||
|
||||
import java.util.EventListener;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package fr.iutfbleau.projetAgile.Controller.EventListener;
|
||||
package fr.iutfbleau.projetAgile.Event;
|
||||
|
||||
public class GridEvent {
|
||||
private int column;
|
@ -1,4 +1,4 @@
|
||||
package fr.iutfbleau.projetAgile.Controller.EventListener;
|
||||
package fr.iutfbleau.projetAgile.Event;
|
||||
|
||||
public class PlayerEvent {
|
||||
|
@ -1,8 +1,8 @@
|
||||
package fr.iutfbleau.projetAgile.Model;
|
||||
|
||||
import fr.iutfbleau.projetAgile.Controller.EventListener.AbstractGridInitiater;
|
||||
import fr.iutfbleau.projetAgile.Event.AbstractGridInitiater;
|
||||
import fr.iutfbleau.projetAgile.Utils.Constants;
|
||||
import fr.iutfbleau.projetAgile.Utils.Constants.GameStatus;
|
||||
import fr.iutfbleau.projetAgile.Utils.GameStatus;
|
||||
|
||||
public class GrilleModel extends AbstractGridInitiater{
|
||||
private int[][] grille;
|
||||
|
@ -3,11 +3,7 @@ package fr.iutfbleau.projetAgile.Utils;
|
||||
import java.awt.Color;
|
||||
|
||||
public class Constants {
|
||||
|
||||
public enum GameStatus {
|
||||
PLAYING, STOP, DRAW;
|
||||
}
|
||||
|
||||
|
||||
public final static Color PLAYER_ONE_COLOR = new Color(252,21,21);
|
||||
public final static Color PLAYER_TWO_COLOR = new Color(241,205,15);
|
||||
public final static Color EMPTY_COLOR = new Color(42,42,42);
|
||||
|
@ -0,0 +1,6 @@
|
||||
package fr.iutfbleau.projetAgile.Utils;
|
||||
|
||||
public enum GameStatus {
|
||||
PLAYING, STOP, DRAW;
|
||||
}
|
||||
|
@ -2,7 +2,6 @@ package fr.iutfbleau.projetAgile.View;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import fr.iutfbleau.projetAgile.Controller.EventListener.*;
|
||||
import fr.iutfbleau.projetAgile.Utils.Constants;
|
||||
|
||||
public class Grille extends JPanel{
|
||||
|
Loading…
Reference in New Issue
Block a user