Compare commits

..

No commits in common. "master" and "v0.1" have entirely different histories.
master ... v0.1

131 changed files with 1539 additions and 5272 deletions

Binary file not shown.

View File

@ -12,7 +12,6 @@ public abstract class CarteCondition extends CarteEffet implements Serializable{
* *
*/ */
private static final long serialVersionUID = 903022795821166067L; private static final long serialVersionUID = 903022795821166067L;
private Condition condition;
public CarteCondition() { public CarteCondition() {
super("",""); super("","");
@ -22,11 +21,12 @@ public abstract class CarteCondition extends CarteEffet implements Serializable{
public CarteCondition(String nom, String description) { public CarteCondition(String nom, String description) {
super(nom, description); super(nom, description);
} }
private Condition condition;
/* /*

View File

@ -17,7 +17,6 @@ public abstract class CarteEquipement extends CartePiochable{
super(t, effet); super(t, effet);
} }
@Override
public void utiliser(Joueur j) { public void utiliser(Joueur j) {
if(!j.getEquipements().contains(this)) { if(!j.getEquipements().contains(this)) {
j.ajouterEquipement(this); j.ajouterEquipement(this);

View File

@ -53,11 +53,6 @@ public class CarteLieu extends CarteEffet{
} }
} }
public CarteLieu getVoisin() {
return voisin;
}
public void setVoisin(CarteLieu cl) { public void setVoisin(CarteLieu cl) {
this.voisin = cl; this.voisin = cl;
} }

View File

@ -3,6 +3,7 @@ package carte;
import java.awt.Point; import java.awt.Point;
import java.util.List; import java.util.List;
import carte.CartePiochable.Type;
import main.Joueur; import main.Joueur;
import main.Pioche; import main.Pioche;
@ -23,10 +24,8 @@ public class CarteLieuMultiple extends CarteLieu{
* @param j Appel la méthode utiliser de effet sur le joueur j * @param j Appel la méthode utiliser de effet sur le joueur j
*/ */
public void utiliser(Joueur j) { public void utiliser(Joueur j) {
Pioche p = (Pioche) j.choisir(pioches, Pioche.class); Pioche p = (Pioche) j.choisir(pioches);
System.out.println(pioches+ " "+p); Carte c = p.piocher();
System.out.println(p.getStack());
Carte c = p.piocher(j);
c.utiliser(j); c.utiliser(j);
} }

View File

@ -31,8 +31,7 @@ public class CarteLieuType extends CarteLieu{
* @param j Appel la méthode utiliser de effet sur le joueur j * @param j Appel la méthode utiliser de effet sur le joueur j
*/ */
public void utiliser(Joueur j) { public void utiliser(Joueur j) {
System.out.println(pioche); CartePiochable carte = pioche.piocher();
CartePiochable carte = pioche.piocher(j);
carte.utiliser(j); carte.utiliser(j);
} }

View File

@ -4,7 +4,6 @@ import java.io.Serializable;
import condition.Condition; import condition.Condition;
import effet.Effet; import effet.Effet;
import main.GestionnaireJeu;
import main.Joueur; import main.Joueur;
public class CartePiochable extends CarteCondition implements Serializable{ public class CartePiochable extends CarteCondition implements Serializable{
@ -21,12 +20,10 @@ public class CartePiochable extends CarteCondition implements Serializable{
public CartePiochable(Type t, String nom, String description) { public CartePiochable(Type t, String nom, String description) {
super(nom, description); super(nom, description);
this.type = t;
} }
public CartePiochable(Type t, Effet e, Condition c) { public CartePiochable(Type t, Effet e, Condition c) {
super(); super();
this.type = t;
this.setEffet(e); this.setEffet(e);
this.setCondition(c); this.setCondition(c);
} }
@ -41,10 +38,7 @@ public class CartePiochable extends CarteCondition implements Serializable{
/* /*
* @param j Appel la méthode utiliser de effet sur le joueur j * @param j Appel la méthode utiliser de effet sur le joueur j
*/ */
@Override
public void utiliser(Joueur j) { public void utiliser(Joueur j) {
GestionnaireJeu gj = GestionnaireJeu.getGestionnaireJeu();
System.out.println("CartePiochable "+this + " Condition : "+this.getCondition()+" Effet : "+this.getEffet()+" Action : "+this.getEffet().getAction());
super.utiliser(j); super.utiliser(j);
} }

View File

@ -1,44 +0,0 @@
package carte;
import java.io.Serializable;
import condition.Condition;
import effet.EffetChoisirCible;
import effet.action.Action;
import main.Contexte;
import main.GestionnaireJeu;
import main.Joueur;
public class CarteVision extends CartePiochable implements Serializable{
/**
*
*/
private static final long serialVersionUID = 903022795821166067L;
public CarteVision(Action a, Condition c) {
super(Type.VISION, "","");
this.setEffet(new EffetChoisirCible(a));
this.setCondition(c);
}
/*
* @param j le joueur utilisant son effet
*/
@Override
public void utiliser(Joueur j1) {
GestionnaireJeu gj = GestionnaireJeu.getGestionnaireJeu();
gj.piocher(j1,this);
Joueur j2 = j1.choisiParmisTous();
boolean M = j2.isMetamorph();
boolean Co = this.getCondition().isTrue(j2);
gj.recevoirCarteVision(j2,this);
boolean C = j2.choisir(Contexte.CHOISIR_VISION);
if((!(M) && Co) || (M && C)) {
this.getEffet().getAction().affecte(j1, j2);
}
}
}

View File

@ -9,7 +9,6 @@ import carte.CarteLieu;
import carte.CarteLieuMultiple; import carte.CarteLieuMultiple;
import carte.CarteLieuType; import carte.CarteLieuType;
import carte.CartePiochable; import carte.CartePiochable;
import carte.CarteVision;
import condition.ConditionClassPersonnage; import condition.ConditionClassPersonnage;
import condition.ConditionEquipe; import condition.ConditionEquipe;
import condition.ConditionMultiple; import condition.ConditionMultiple;
@ -23,7 +22,6 @@ import effet.EffetSelf;
import effet.action.ActionAltererStatistiquesJoueur; import effet.action.ActionAltererStatistiquesJoueur;
import effet.action.ActionAltererStatistiquesJoueurRoll; import effet.action.ActionAltererStatistiquesJoueurRoll;
import effet.action.ActionMultiple; import effet.action.ActionMultiple;
import effet.action.ActionMultipleChoisir;
import effet.action.ActionReveal; import effet.action.ActionReveal;
import effet.action.ActionVoler; import effet.action.ActionVoler;
import main.Joueur; import main.Joueur;
@ -41,18 +39,13 @@ import personnage.Vampire;
public class CreatingCardsTest { public class CreatingCardsTest {
public static void init() { public static void main(String[] args) {
// Lumière // Lumière
//Ange gardien //Ange gardien
try { try {
/*
for(int i = 0; i < 67; i++) {
DatabaseManager.queryInsertObject(i, null);
}
DatabaseManager.queryInsertObject(2,new CartePiochable(CartePiochable.Type.LUMIERE, DatabaseManager.queryInsertObject(2,new CartePiochable(CartePiochable.Type.LUMIERE,
new EffetSelf(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_IMMUNITY, 1, true)))); new EffetSelf(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_IMMUNITY, 1, true))));
@ -121,19 +114,19 @@ public class CreatingCardsTest {
// Araignée Sanguinaire // Araignée Sanguinaire
DatabaseManager.queryInsertObject(17, new CartePiochable(CartePiochable.Type.TENEBRE,new EffetMultiple(new EffetChoisirCible(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP, -2, true)), DatabaseManager.queryInsertObject(17, new CartePiochable(CartePiochable.Type.TENEBRE,new EffetMultiple(new EffetCiblerTous(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP, -2, true)),
new EffetSelf(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP, -2, true))))); new EffetSelf(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP, -2, true)))));
// Chauve - souris vampire // Chauve - souris vampire
DatabaseManager.queryInsertObject(18, new CartePiochable(CartePiochable.Type.TENEBRE,new EffetMultiple(new EffetChoisirCible(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP, -2, true)), DatabaseManager.queryInsertObject(18, new CartePiochable(CartePiochable.Type.TENEBRE,new EffetMultiple(new EffetCiblerTous(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP, -2, true)),
new EffetSelf(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP, 1, true))))); new EffetSelf(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP, 1, true)))));
DatabaseManager.queryInsertObject(19, new CartePiochable(CartePiochable.Type.TENEBRE,new EffetMultiple(new EffetChoisirCible(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP, -2, true)), DatabaseManager.queryInsertObject(19, new CartePiochable(CartePiochable.Type.TENEBRE,new EffetMultiple(new EffetCiblerTous(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP, -2, true)),
new EffetSelf(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP, 1, true))))); new EffetSelf(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP, 1, true)))));
DatabaseManager.queryInsertObject(20, new CartePiochable(CartePiochable.Type.TENEBRE,new EffetMultiple(new EffetChoisirCible(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP, -2, true)), DatabaseManager.queryInsertObject(20, new CartePiochable(CartePiochable.Type.TENEBRE,new EffetMultiple(new EffetCiblerTous(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP, -2, true)),
new EffetSelf(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP, 1, true))))); new EffetSelf(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP, 1, true)))));
// Dynamite // Dynamite
@ -142,11 +135,6 @@ public class CreatingCardsTest {
// Hache tueuse // Hache tueuse
DatabaseManager.queryInsertObject(22,new CarteEquipementStat(CartePiochable.Type.TENEBRE,
new EffetSelf(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_DAMAGE, 1, true))));
DatabaseManager.queryInsertObject(22,new CarteEquipementStat(CartePiochable.Type.TENEBRE, DatabaseManager.queryInsertObject(22,new CarteEquipementStat(CartePiochable.Type.TENEBRE,
new EffetSelf(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_DAMAGE, 1, true)))); new EffetSelf(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_DAMAGE, 1, true))));
@ -164,7 +152,6 @@ public class CreatingCardsTest {
// Poupé démoniaque // Poupé démoniaque
// 26 // 26
DatabaseManager.queryInsertObject(28,new CartePiochable(CartePiochable.Type.TENEBRE, DatabaseManager.queryInsertObject(28,new CartePiochable(CartePiochable.Type.TENEBRE,
new EffetSelf(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP, 20, true)) new EffetSelf(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP, 20, true))
,new ConditionMultiple(new ConditionEquipe(CartePersonnage.Equipe.SHADOW), new ConditionReveal()) ,new ConditionMultiple(new ConditionEquipe(CartePersonnage.Equipe.SHADOW), new ConditionReveal())
@ -178,27 +165,26 @@ public class CreatingCardsTest {
DatabaseManager.queryInsertObject(31,new CartePiochable(CartePiochable.Type.TENEBRE, DatabaseManager.queryInsertObject(31,new CartePiochable(CartePiochable.Type.TENEBRE,
new EffetChoisirCible(new ActionVoler(ActionVoler.VOLER)))); new EffetChoisirCible(new ActionVoler(ActionVoler.VOLER))));
/*
DatabaseManager.queryInsertObject(32,new CarteEquipementStat(CartePiochable.Type.TENEBRE, DatabaseManager.queryInsertObject(32,new CarteEquipementStat(CartePiochable.Type.TENEBRE,
new EffetSelf(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_DAMAGE, 1, true)))); new EffetSelf(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_DAMAGE, 1, true))));
*/
// Vision clairvoyante // Vision clairvoyante
DatabaseManager.queryInsertObject(33, new CarteVision(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP, -1, true), DatabaseManager.queryInsertObject(33, new CartePiochable(CartePiochable.Type.VISION,new EffetChoisirCible(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP, -1, true)),
new ConditionStatistiques(ConditionStatistiques.JOUEUR, Joueur.PLAYER_HP, 11, ConditionStatistiques.LESS))); new ConditionStatistiques(ConditionStatistiques.JOUEUR, Joueur.PLAYER_HP, 11, ConditionStatistiques.LESS)));
// Vision cupide // Vision cupide
DatabaseManager.queryInsertObject(34,new CarteVision(new ActionMultipleChoisir(new ActionVoler(ActionVoler.DONNER),new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP,-1,true)), DatabaseManager.queryInsertObject(34,new CartePiochable(CartePiochable.Type.VISION,new EffetChoisirEffet(new EffetChoisirCible(new ActionVoler(ActionVoler.DONNER)),new EffetChoisirCible(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP,-1,true))),
new ConditionEquipe(CartePersonnage.Equipe.NEUTRE,CartePersonnage.Equipe.SHADOW))); new ConditionEquipe(CartePersonnage.Equipe.NEUTRE,CartePersonnage.Equipe.SHADOW)));
DatabaseManager.queryInsertObject(35,new CarteVision(new ActionMultipleChoisir(new ActionVoler(ActionVoler.DONNER),new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP,-1,true)), DatabaseManager.queryInsertObject(35,new CartePiochable(CartePiochable.Type.VISION,new EffetChoisirEffet(new EffetChoisirCible(new ActionVoler(ActionVoler.DONNER)),new EffetChoisirCible(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP,-1,true))),
new ConditionEquipe(CartePersonnage.Equipe.NEUTRE,CartePersonnage.Equipe.SHADOW))); new ConditionEquipe(CartePersonnage.Equipe.NEUTRE,CartePersonnage.Equipe.SHADOW)));
// Vision destructrice // Vision destructrice
DatabaseManager.queryInsertObject(36, new CarteVision(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP, -2, true), DatabaseManager.queryInsertObject(36, new CartePiochable(CartePiochable.Type.VISION,new EffetChoisirCible(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP, -2, true)),
new ConditionStatistiques(ConditionStatistiques.JOUEUR, Joueur.PLAYER_HP, 12, ConditionStatistiques.MORE))); new ConditionStatistiques(ConditionStatistiques.JOUEUR, Joueur.PLAYER_HP, 12, ConditionStatistiques.MORE)));
@ -206,35 +192,35 @@ public class CreatingCardsTest {
// Vision enivrante // Vision enivrante
DatabaseManager.queryInsertObject(38,new CarteVision(new ActionMultipleChoisir(new ActionVoler(ActionVoler.DONNER),new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP,-1,true)), DatabaseManager.queryInsertObject(38,new CartePiochable(CartePiochable.Type.VISION,new EffetChoisirEffet(new EffetChoisirCible(new ActionVoler(ActionVoler.DONNER)),new EffetChoisirCible(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP,-1,true))),
new ConditionEquipe(CartePersonnage.Equipe.NEUTRE,CartePersonnage.Equipe.SHADOW))); new ConditionEquipe(CartePersonnage.Equipe.NEUTRE,CartePersonnage.Equipe.SHADOW)));
DatabaseManager.queryInsertObject(39,new CarteVision( new ActionMultipleChoisir(new ActionVoler(ActionVoler.DONNER),new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP,-1,true)), DatabaseManager.queryInsertObject(39,new CartePiochable(CartePiochable.Type.VISION,new EffetChoisirEffet(new EffetChoisirCible(new ActionVoler(ActionVoler.DONNER)),new EffetChoisirCible(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP,-1,true))),
new ConditionEquipe(CartePersonnage.Equipe.NEUTRE,CartePersonnage.Equipe.SHADOW))); new ConditionEquipe(CartePersonnage.Equipe.NEUTRE,CartePersonnage.Equipe.SHADOW)));
// Vision Foudroyante // Vision Foudroyante
DatabaseManager.queryInsertObject(40,new CarteVision(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP,-1,true), DatabaseManager.queryInsertObject(40,new CartePiochable(CartePiochable.Type.VISION,new EffetChoisirCible(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP,-1,true)),
new ConditionEquipe(CartePersonnage.Equipe.SHADOW))); new ConditionEquipe(CartePersonnage.Equipe.SHADOW)));
// Vision furtive // Vision furtive
DatabaseManager.queryInsertObject(41,new CarteVision(new ActionMultipleChoisir(new ActionVoler(ActionVoler.DONNER),new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP,-1,true)), DatabaseManager.queryInsertObject(41,new CartePiochable(CartePiochable.Type.VISION,new EffetChoisirEffet(new EffetChoisirCible(new ActionVoler(ActionVoler.DONNER)),new EffetChoisirCible(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP,-1,true))),
new ConditionEquipe(CartePersonnage.Equipe.HUNTER,CartePersonnage.Equipe.SHADOW))); new ConditionEquipe(CartePersonnage.Equipe.HUNTER,CartePersonnage.Equipe.SHADOW)));
DatabaseManager.queryInsertObject(42,new CarteVision(new ActionMultipleChoisir(new ActionVoler(ActionVoler.DONNER),new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP,-1,true)), DatabaseManager.queryInsertObject(42,new CartePiochable(CartePiochable.Type.VISION,new EffetChoisirEffet(new EffetChoisirCible(new ActionVoler(ActionVoler.DONNER)),new EffetChoisirCible(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP,-1,true))),
new ConditionEquipe(CartePersonnage.Equipe.HUNTER,CartePersonnage.Equipe.SHADOW))); new ConditionEquipe(CartePersonnage.Equipe.HUNTER,CartePersonnage.Equipe.SHADOW)));
// Vision Mortifère // Vision Mortifère
DatabaseManager.queryInsertObject(43,new CarteVision(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP,-1,true), DatabaseManager.queryInsertObject(43,new CartePiochable(CartePiochable.Type.VISION,new EffetChoisirCible(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP,-1,true)),
new ConditionEquipe(CartePersonnage.Equipe.SHADOW))); new ConditionEquipe(CartePersonnage.Equipe.SHADOW)));
// Vision lugubre // Vision lugubre
DatabaseManager.queryInsertObject(45,new CarteVision(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP,-2,true), DatabaseManager.queryInsertObject(45,new CartePiochable(CartePiochable.Type.VISION,new EffetChoisirCible(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP,-2,true)),
new ConditionEquipe(CartePersonnage.Equipe.SHADOW))); new ConditionEquipe(CartePersonnage.Equipe.SHADOW)));
// Vision réconfortante // Vision réconfortante
@ -254,7 +240,7 @@ public class CreatingCardsTest {
DatabaseManager.queryInsertObject(56,new Metamorphe()); DatabaseManager.queryInsertObject(56,new Metamorphe());
DatabaseManager.queryInsertObject(57,new Vampire()); DatabaseManager.queryInsertObject(57,new Vampire());
*/
//62 //62
@ -269,8 +255,10 @@ public class CreatingCardsTest {
// 64 // 64
CarteLieu lieu3 = new CarteLieu(new Point(-1,9)); CarteLieu lieu3 = new CarteLieu(new Point(-1,9));
lieu3.setEffet(new EffetChoisirCible(new ActionMultipleChoisir(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP,-2,true), lieu3.setEffet(new EffetChoisirEffet(new EffetChoisirCible(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP,-2,true)),
new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP,1,true))));
new EffetChoisirCible(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP,1,true))));
DatabaseManager.queryInsertObject(64,lieu3); DatabaseManager.queryInsertObject(64,lieu3);
// 65 // 65
@ -282,7 +270,7 @@ public class CreatingCardsTest {
DatabaseManager.queryInsertObject(66,lieu5); DatabaseManager.queryInsertObject(66,lieu5);
// 66 // 66
CarteLieu lieu6 = new CarteLieu(new Point(-1,10)); CarteLieu lieu6 = new CarteLieu(new Point(-1,9));
lieu6.setEffet(new EffetChoisirCible(new ActionVoler(ActionVoler.VOLER))); lieu6.setEffet(new EffetChoisirCible(new ActionVoler(ActionVoler.VOLER)));
DatabaseManager.queryInsertObject(67,lieu6); DatabaseManager.queryInsertObject(67,lieu6);

View File

@ -19,20 +19,15 @@ public class DatabaseManager {
private final static String url = "jdbc:postgresql://localhost:5432/ShadowHunterDatabase"; private final static String url = "jdbc:postgresql://localhost:5432/ShadowHunterDatabase";
private final static String user = "shManager"; private final static String user = "shManager";
private final static String password = "shadowhunter1234"; private final static String password = "shadowhunter1234";
private static Connection connection;
public static void connect() throws SQLException { public static Connection connect() throws SQLException {
if(connection == null || connection.isClosed()) { return DriverManager.getConnection(url, user, password);
connection = DriverManager.getConnection(url, user, password);
}
} }
public static List<Record> remplirTable(String query) { public static List<Record> remplirTable(String query) {
List<Record> list = new ArrayList<Record>(); List<Record> list = new ArrayList<Record>();
try (Connection connection = connect()) {
try{
connect();
//System.out.println("Connected to PostgreSQL database!"); //System.out.println("Connected to PostgreSQL database!");
Statement statement = connection.createStatement(); Statement statement = connection.createStatement();
//System.out.println("Reading records..."); //System.out.println("Reading records...");
@ -49,8 +44,8 @@ public class DatabaseManager {
public static List<Record> remplirTableSansImage(String query) { public static List<Record> remplirTableSansImage(String query) {
List<Record> list = new ArrayList<Record>(); List<Record> list = new ArrayList<Record>();
try { try (Connection connection = connect()) {
connect();
//System.out.println("Connected to PostgreSQL database!"); //System.out.println("Connected to PostgreSQL database!");
Statement statement = connection.createStatement(); Statement statement = connection.createStatement();
//System.out.println("Reading records..."); //System.out.println("Reading records...");
@ -98,8 +93,8 @@ public class DatabaseManager {
query = "UPDATE " + table + " SET objet = ? " query = "UPDATE " + table + " SET objet = ? "
+ " WHERE id = ? " ; + " WHERE id = ? " ;
connect(); Connection conn = connect();
PreparedStatement pst = connection.prepareStatement(query); PreparedStatement pst = conn.prepareStatement(query);
pst.setBinaryStream(1, objectIS); pst.setBinaryStream(1, objectIS);
pst.setInt(2, id); pst.setInt(2, id);
pst.executeUpdate(); pst.executeUpdate();

View File

@ -54,8 +54,6 @@ public class QueryGenerator {
table = getTable("CartesPersonnage"); table = getTable("CartesPersonnage");
} else if(id <= 61) { } else if(id <= 61) {
table = getTable("CartesDos"); table = getTable("CartesDos");
}else if(id <= 67) {
table = getTable("CartesLieu");
} }
return "SELECT * FROM " + table + " WHERE id = " + id; return "SELECT * FROM " + table + " WHERE id = " + id;
} }

View File

@ -1,7 +1,6 @@
package database; package database;
import java.awt.Image;
import java.awt.image.BufferedImage;
import java.io.ByteArrayInputStream; import java.io.ByteArrayInputStream;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
@ -16,8 +15,6 @@ import javax.imageio.ImageIO;
import carte.Carte; import carte.Carte;
import carte.CarteLieu; import carte.CarteLieu;
import carte.CartePiochable; import carte.CartePiochable;
import javafx.embed.swing.SwingFXUtils;
import javafx.scene.image.Image;
import personnage.CartePersonnage; import personnage.CartePersonnage;
public class RessourceLoader { public class RessourceLoader {
@ -38,32 +35,28 @@ public class RessourceLoader {
private final int ID_DOS_TENEBRE= 59; private final int ID_DOS_TENEBRE= 59;
private final int ID_DOS_VISION= 61; private final int ID_DOS_VISION= 61;
private Map<Carte, BufferedImage> ressourcesCartes; private Map<Carte, Image> ressourcesCartes;
private Map<String, BufferedImage> ressourcesDosCartes; private Map<String, Image> ressourcesDosCartes;
public RessourceLoader() { public RessourceLoader() {
this.ressourcesCartes = new HashMap<Carte,BufferedImage>(); this.ressourcesCartes = new HashMap<Carte,Image>();
this.ressourcesDosCartes = new HashMap<String, BufferedImage>(); this.ressourcesDosCartes = new HashMap<String, Image>();
} }
private Map<Integer, Carte> loadCards() throws ClassNotFoundException, IOException{ private Map<Integer, Carte> loadCards() throws ClassNotFoundException, IOException{
Table t = new Table(); Table t = new Table();
Map<Integer, Carte> cartes = new HashMap<Integer,Carte>(); Map<Integer, Carte> cartes = new HashMap<Integer,Carte>();
for(int i = 0; i < 67; i++) { for(int i = 0; i < 61; i++) {
String query = QueryGenerator.selectId(i+1); String query = QueryGenerator.selectId(i+1);
t.remplirTableQuery(query); t.remplirTableQuery(query);
Record r = t.getList().get(i); byte[] obj = t.getList().get(i).getObjet();
byte[] obj = r.getObjet(); if(obj != null) {
Object o = deserialize(obj); Object o = deserialize(obj);
if(o != null && o != null) {
Carte c = (Carte)o; Carte c = (Carte)o;
c.setNom(r.getNom());
cartes.put(i+1, c); cartes.put(i+1, c);
} }
} }
@ -112,21 +105,21 @@ public class RessourceLoader {
return is.readObject(); return is.readObject();
} }
private BufferedImage loadImage(int id) throws IOException { private Image loadImage(int id) throws IOException {
String name = ""+id+".png"; String name = ""+id+".png";
String url = "ressources/cartes/"+name; String url = "ressources/cartes/"+name;
BufferedImage picture = ImageIO.read(new File(url)); Image picture = ImageIO.read(new File(url));
return picture; return picture;
} }
private Map<Carte, BufferedImage> getMapImageCarte(Map<Integer, Carte> cartes) throws IOException{ private Map<Carte, Image> getMapImageCarte(Map<Integer, Carte> cartes) throws IOException{
Map<Carte, BufferedImage> mapCarteImage = new HashMap<Carte, BufferedImage>(); Map<Carte, Image> mapCarteImage = new HashMap<Carte, Image>();
for(Integer i : cartes.keySet()) { for(Integer i : cartes.keySet()) {
Carte c = cartes.get(i); Carte c = cartes.get(i);
BufferedImage img = loadImage(i); Image img = loadImage(i);
mapCarteImage.put(c,img); mapCarteImage.put(c,img);
} }
@ -171,12 +164,13 @@ public class RessourceLoader {
List<CartePiochable> cartesType = new ArrayList<CartePiochable>(); List<CartePiochable> cartesType = new ArrayList<CartePiochable>();
for(Carte c : cartes) { for(Carte c : cartes) {
if(c instanceof CartePiochable) { if(c instanceof CartePiochable) {
CartePiochable carte = (CartePiochable) c; CartePiochable carte = (CartePiochable) c;
System.out.println(carte.getNom()+" "+carte.getType());
CartePiochable.Type type = carte.getType();
CartePiochable.Type type = carte.getType();
if(t == type) { if(t == type) {
cartesType.add(carte); cartesType.add(carte);
} }
@ -214,16 +208,4 @@ public class RessourceLoader {
return cartesLieu; return cartesLieu;
} }
public Map<Carte,BufferedImage> getRessourceCartes(){
return this.ressourcesCartes;
}
public Map<String,BufferedImage> getRessourceDosCartes(){
return this.ressourcesDosCartes;
}
public static Image toJavaFX(BufferedImage img) {
Image image = SwingFXUtils.toFXImage(img, null);
return image;
}
} }

View File

@ -24,7 +24,7 @@ choisir.equipement.a.voler=Choisissez un
carte.vision=Carte Vision carte.vision=Carte Vision
jouer.a.qui.donner.carte=Choisissez un joueur à  qui donner la carte. jouer.a.qui.donner.carte=Choisissez un joueur à  qui donner la carte.
carte=Carte carte=Carte
effet=Effets sonores : effet=Effet :
carte.vue.par.joueur.pioche=Cette carte ne peut être vu que par le joueur qui la pioche. carte.vue.par.joueur.pioche=Cette carte ne peut être vu que par le joueur qui la pioche.
voir.carte=Voir carte voir.carte=Voir carte
recoit=reçoit recoit=reçoit
@ -69,48 +69,3 @@ musique=Musique
langue=Langue langue=Langue
parametre=Paramètres parametre=Paramètres
enregistrer=Enregistrer enregistrer=Enregistrer
quitter=Quitter
retour=Retour
vousetes=Vous êtes :
voulez.vous.faire.action=Voulez vous faire cette action ?
oui=oui
non=non
choisir.joueur.attaquer=Choisir un joueur à attaquer !
stop=Stop
choisir.jouer.a.qui.donner.vision=Choisir un joueur à qui donner la carte vision
attaquer=Attaquer !
voulez.vous.attaquer.joueur=Voulez-vous attaquer un joueur ?
arriver.sur.carte.lieux=Vous arrivez sur cette Carte Lieu
ok=Ok
pause=Pause
sons=Sons
jeux=Jeux
reprendre.partie=Reprendre la partie
quitter.jeu=Quitter le jeu
equipement=Equipements
glisser.barre=Glissez la barre
page.precedente=Page précédente
page.suivante=Page suivante
menu=Menu
vous.avez.obtenu=Vous avez obtenu
souhaiter.vous.attaquer=Souhaitez vous attaquer ?
souhaiter.vous.activer.effet.lieu=Souhaitez vous activer l'effet du lieu ?
utilier.effet=Utiliser Effet
va.user.de.son.pouvoir=va user de son pouvoir
a.reussi.a.utiliser.son.pouvoir=a réussi à utiliser son pouvoir
cacher.carte.vision=Cachez la carte vision
consulter.sa.carte=Consulter sa carte
manque.joueur=Il manque des joueurs pour lancer une partie.
ajout.joueur=Ajout du joueur
desistement=Desistement du joueur
ia.facile=ia facile
ia.moyenne=ia moyenne
ia.difficile=ia difficile
erreur.difficulte=erreur choix difficulté de l'ia
retour.menu=Retour au Menu
retour.jeu=Retour au jeu
fichier.audio.non.trouver=le fichier audio n'est pas trouvé
vous.etes.soigne.de=Vous êtes soigné de
vous.etes.blesser.de=Vous êtes blessé de
souhaiter.vous.attaquer.qq=Souhaitez-vous attaquer quelqu'un?
souhaiter.vous.activer.carte.vision=Souhaitez-vous activer l'effet de la carte vision

View File

@ -1,117 +0,0 @@
jouer=Jugar
regles=Reglas
commencer.partie=Comienza el juego
entrez.nom.joueur= Ingrese los nombres de los jugadores
nombre.joueur.minimum=(Necesita al menos 4 jugadores)
cocher.case=Marque la casilla para hacer de el jugador un jugador virtual
carte.personnage=Tarjeta de personaje
se.reveler=Revelarse
pas.de=sin
dégats=daños
reveler.et.soigner=Revela y cura mis heridas
rien.faire=hacer nada
effet.carte=Efecto de la tarjeta
choisir.joueur.soigner=Elige un jugador que quieras curar
joueur1.soigne.joueur2=El jugador 1 cura al jugador 2
lancer.de.des=Tirar los dados
choisr.joueur=Elige un jugador
joueur=Jugador
choisir.joueur.infliger.blessures=Elige un jugador quien recibir 2 daños.
carte.equipement.a.donner=Elija la tarjeta de equipo que tiene dará
joueur.a.qui.donner.carte.equipement=Elige un jugador para darle esta tarjeta de equipo
carte.equipement=Tarjetas de equipo
choisir.equipement.a.voler=Elige equipo para robar
carte.vision=Tarjeta visión
jouer.a.qui.donner.carte=Elige un jugador para darle la tarjeta.
carte=tarjeta
effet=Efectos sonidos :
carte.vue.par.joueur.pioche=Esta carta solo puede ser vista por el jugador que la roba.
voir.carte=Ver la tarjeta
recoit=recibe
blessure=Lesión.
se.passe.rien=Se Pasa nada.
au.tour.de=Es el turno de
score.des.1=Puntuación de 1
score.des.2=Puntuación de 2
joueur1=Jugador 1
joueur2=Jugador 2
joueur3=Jugador 3
joueur4=Jugador 4
joueur5=Jugador 5
joueur6=Jugador 6
joueur7=Jugador 7
joueur8=Jugador 8
description.capacite.carte.lieux=Descripción de la capacidad de la tarjeta de ubicación.
utiliser.capaciter.lieux=Aprovechar la capacidad del local
sauter.etape=Salta este paso
carte.lieux=Tarjeta de ubicación
attaquer.joueur=¡Ataca a otro jugador!
piocher.carte=Dibujar una tarjeta
carte.tenebre=Tarjeta oscura
carte.lumiere=Tarjeta luz
attaquer.ou.soigner=Ataca al jugador o cura 2 heridas
ne.pas.attaqur=No atacar
reveler.identite=revelar su identidad!
c.est=es
faction=Facción:
utiliser.capacite=usa su capacidad.
nom.personnages=Nombre Carácter
votre.competence=Su competencia:
retourner.carte=Voltear la tarjeta
benediction=Bendición
premier.secours=Primeros auxilios
voler.equipement.joueur=Roba el equipo de los jugadores que elijas
choisir.carte.equipement.a.voler=Haga clic en la tarjeta del equipo que desea volar.
consequence=consecuencia
se.soigner=Cuidarse
mode.claire=Modo claro
musique=Música
langue=Lengua
parametre=configuraciones
enregistrer=salvado
quitter=Salir
retour=Regreso
vousetes=Eres :
voulez.vous.faire.action=¿Quieres hacer esta acción?
oui=si
non=no
choisir.joueur.attaquer=¡Elige un jugador para atacar!
stop=Detener
choisir.jouer.a.qui.donner.vision=Elige un jugador para darle la carta de visión
attaquer=¡Atacar!
voulez.vous.attaquer.joueur=¿Quieres atacar a un jugador?
arriver.sur.carte.lieux=Llega en es tarjeta del lugar
ok=Ok
pause=Pausa
sons=Suena
jeux=Juegos
reprendre.partie=Reanudar el juego
quitter.jeu=Abandonar el juego
equipement=Equipo
glisser.barre=Desliza la barra
page.precedente=página anterior
page.suivante=Siguiente página
menu=Menu
vous.avez.obtenu=Has obtenido
souhaiter.vous.attaquer=¿Quieres atacar?
souhaiter.vous.activer.effet.lieu=¿Quieres activar el efecto del lugar?
utilier.effet=Efecto de uso
va.user.de.son.pouvoir=usará su poder
a.reussi.a.utiliser.son.pouvoir=logró usar su poder
cacher.carte.vision=Ocultar la tarjeta de visión
consulter.sa.carte=Consulta tu tarjeta
manque.joueur=Faltan jugadores para comenzar un juego.
ajout.joueur=Agregar al jugador
desistement=Retirada del jugador
ia.facile=ia fácil
ia.moyenne=ia medio
ia.difficile=ia difícil
erreur.difficulte=dificultad de elección de error del ai
retour.menu=Volver al menú
retour.jeu=Volver al juego
fichier.audio.non.trouver=no se encuentra el archivo de audio
choisir.joueur.a.qui.voler.equipement=¡Elige al jugador para robar el equipo!
vous.etes.soigne.de=Te cuidan
vous.etes.blesser.de=Estás herido de
souhaiter.vous.attaquer.qq=¿Atacarías a alguien?
souhaiter.vous.activer.carte.vision=¿Quieres activar el efecto de tarjeta de visión?

View File

@ -5,7 +5,7 @@ entrez.nom.joueur= Enter the players name
nombre.joueur.minimum=(Requires at least 4 players) nombre.joueur.minimum=(Requires at least 4 players)
cocher.case=Check the box to make the player a virtual player cocher.case=Check the box to make the player a virtual player
carte.personnage=Character card carte.personnage=Character card
se.reveler=Reveal myself se.reveler=Reveal himslef
pas.de=No pas.de=No
dégats=damages dégats=damages
reveler.et.soigner=Reveal and heal my wounds reveler.et.soigner=Reveal and heal my wounds
@ -13,7 +13,7 @@ rien.faire=Do nothing
effet.carte=Card effect effet.carte=Card effect
choisir.joueur.soigner=Choose a player you want to care for choisir.joueur.soigner=Choose a player you want to care for
joueur1.soigne.joueur2=Player 1 heals Player 2 joueur1.soigne.joueur2=Player 1 heals Player 2
lancer.de.des=Roll the dice lancer.de.des=roll the dice
choisr.joueur=Choose a player choisr.joueur=Choose a player
joueur=Player joueur=Player
choisir.joueur.infliger.blessures=Choose a player to inflict 2 injuries choisir.joueur.infliger.blessures=Choose a player to inflict 2 injuries
@ -24,7 +24,7 @@ choisir.equipement.a.voler=Choose equipment to steal
carte.vision=Vision Card carte.vision=Vision Card
jouer.a.qui.donner.carte=Choose a player to give the card to. jouer.a.qui.donner.carte=Choose a player to give the card to.
carte=Card carte=Card
effet=Sound Effects: effet=Effect :
carte.vue.par.joueur.pioche=This card can only be seen by the player who draws it. carte.vue.par.joueur.pioche=This card can only be seen by the player who draws it.
voir.carte=See card voir.carte=See card
recoit=receives recoit=receives
@ -69,50 +69,4 @@ mode.claire=Clear mode
musique=Music musique=Music
langue=Language langue=Language
parametre=Setting parametre=Setting
enregistrer=Save enregistrer=Enregistrer
quitter=Exit
retour=Return
vousetes=Vous êtes :
voulez.vous.faire.action=Do you want to do this action?
oui=yes
non=no
choisir.joueur.attaquer=Choose a player to attack!
stop=Stop
choisir.jouer.a.qui.donner.vision=Choose a player to give the vision card to
attaquer=Attack!
voulez.vous.attaquer.joueur=Do you want to attack a player?
arriver.sur.carte.lieux=You arrive on this Location Card
ok=Ok
pause=Pause
sons=Sounds
jeux=Game
reprendre.partie=Resume the game
quitter.jeu=Leave the game
equipement=Equipment
glisser.barre=Slide the bar
page.precedente=Previous page
page.suivante=Next page
menu=Menu
vous.avez.obtenu=You obtained
souhaiter.vous.attaquer=Do you want to attack?
souhaiter.vous.activer.effet.lieu=Do you want to activate the effect of the place?
utilier.effet=Use Effect
va.user.de.son.pouvoir=will use his power
a.reussi.a.utiliser.son.pouvoir=managed to use his power
cacher.carte.vision=Hide the vision card
consulter.sa.carte=Consult your card
manque.joueur=There are missing players to start a game.
ajout.joueur=Adding the player
desistement=Player's disclaimer
ia.facile=ai easy
ia.moyenne=ai average
ia.difficile=ai difficult
erreur.difficulte=error choice difficulty of the ai
retour.menu=Return to Menu
retour.jeu=Back to the game
fichier.audio.non.trouver=audio file is not found
choisir.joueur.a.qui.voler.equipement=Choose the player to steal equipment from!
vous.etes.soigne.de=You are cared for
vous.etes.blesser.de=Sei ferito da
souhaiter.vous.attaquer.qq=Would you attack someone?
souhaiter.vous.activer.carte.vision=Do you want to activate the vision card effect?

View File

@ -16,15 +16,15 @@ joueur1.soigne.joueur2=Joueur 1 soigne Joueur 2
lancer.de.des=Lancer les dés lancer.de.des=Lancer les dés
choisr.joueur=Choisissez un joueur choisr.joueur=Choisissez un joueur
joueur=Joueur joueur=Joueur
choisir.joueur.infliger.blessures=Choisissez un joueur à  qui infliger 2 blessures choisir.joueur.infliger.blessures=Choisissez un joueur à qui infliger 2 blessures
carte.equipement.a.donner=Choisissez la carte équipement que vous allez donner carte.equipement.a.donner=Choisissez la carte équipement que vous allez donner
joueur.a.qui.donner.carte.equipement=Choisissez un joueur à  qui donner cette carte équipement joueur.a.qui.donner.carte.equipement=Choisissez un joueur à qui donner cette carte équipement
carte.equipement=Cartes équipements carte.equipement=Cartes équipements
choisir.equipement.a.voler=Choisissez un équipement à voler choisir.equipement.a.voler=Choisissez un équipement à voler
carte.vision=Carte Vision carte.vision=Carte Vision
jouer.a.qui.donner.carte=Choisissez un joueur à  qui donner la carte. jouer.a.qui.donner.carte=Choisissez un joueur à qui donner la carte.
carte=Carte carte=Carte
effet=Effets sonores : effet=Effet :
carte.vue.par.joueur.pioche=Cette carte ne peut être vu que par le joueur qui la pioche. carte.vue.par.joueur.pioche=Cette carte ne peut être vu que par le joueur qui la pioche.
voir.carte=Voir carte voir.carte=Voir carte
recoit=reçoit recoit=reçoit
@ -69,49 +69,3 @@ musique=Musique
langue=Langue langue=Langue
parametre=Paramètre parametre=Paramètre
enregistrer=Enregistrer enregistrer=Enregistrer
quitter=Quitter
retour=Retour
vousetes=Vous êtes :
voulez.vous.faire.action=Voulez vous faire cette action ?
oui=oui
non=non
choisir.joueur.attaquer=Choisir un joueur à attaquer !
stop=Stop
choisir.jouer.a.qui.donner.vision=Choisir un joueur à qui donner la carte vision
attaquer=Attaquer !
voulez.vous.attaquer.joueur=Voulez-vous attaquer un joueur ?
arriver.sur.carte.lieux=Vous arrivez sur cette Carte Lieu
ok=Ok
pause=Pause
sons=Sons
jeux=Jeux
reprendre.partie=Reprendre la partie
quitter.jeu=Quitter le jeu
equipement=Equipements
glisser.barre=Glissez la barre
page.precedente=Page précédente
page.suivante=Page suivante
menu=Menu
vous.avez.obtenu=Vous avez obtenu
souhaiter.vous.attaquer=Souhaitez vous attaquer ?
souhaiter.vous.activer.effet.lieu=Souhaitez vous activer l'effet du lieu ?
utilier.effet=Utiliser Effet
va.user.de.son.pouvoir=va user de son pouvoir
a.reussi.a.utiliser.son.pouvoir=a réussi à utiliser son pouvoir
cacher.carte.vision=Cachez la carte vision
consulter.sa.carte=Consulter sa carte
manque.joueur=Il manque des joueurs pour lancer une partie.
ajout.joueur=Ajout du joueur
desistement=Desistement du joueur
ia.facile=ia facile
ia.moyenne=ia moyenne
ia.difficile=ia difficile
erreur.difficulte=erreur choix difficulté de l'ia
retour.menu=Retour au Menu
retour.jeu=Retour au jeu
fichier.audio.non.trouver=le fichier audio n'est pas trouvé
choisir.joueur.a.qui.voler.equipement=Choisissez le joueur à qui voler un equipement!
vous.etes.soigne.de=Vous êtes soigné de
vous.etes.blesser.de=Vous êtes blessé de
souhaiter.vous.attaquer.qq=Souhaitez-vous attaquer quelqu'un?
souhaiter.vous.activer.carte.vision=Souhaitez-vous activer l'effet de la carte vision

View File

@ -1,117 +0,0 @@
jouer=Giocare
regles=Regole
commencer.partie=Cominciare una partita
entrez.nom.joueur= Mettete i nomi dei giocatori
nombre.joueur.minimum=(Necessita di un minimo di 4 giocatori)
cocher.case=Attivare la casella perché sia un giocatore virtuale
carte.personnage=Carta personaggio
se.reveler=Rivelarsi
pas.de=Non c'é
dégats=danni
reveler.et.soigner=Rivelarsi e guarirsi le ferite
rien.faire=Non fare niente
effet.carte=Effetto carta
choisir.joueur.soigner=Scegliete un giocatore da guarire
joueur1.soigne.joueur2=Giocatore 1 guarisce giocatore 2
lancer.de.des=Lancio dei dadi
choisr.joueur=Scegliete un giocatore
joueur=Giocatore
choisir.joueur.infliger.blessures=Scegliete un giocatore al quale infliggere delle ferite
carte.equipement.a.donner=Choisissez la carte équipement que vous allez donner
joueur.a.qui.donner.carte.equipement=Scegliete un giocatore al quale dare un equipaggiamento
carte.equipement=Carte equipaggiamento
choisir.equipement.a.voler=Scegliete un equipaggiamento da rubare
carte.vision=Carta Visione
jouer.a.qui.donner.carte=Scegliete un giocatore al quale dare une carta.
carte=Carta
effet=Effetti sonori :
carte.vue.par.joueur.pioche=Questa carta puo essere vista solo dal giocatore che la pesca
voir.carte=Vedere carta
recoit=riceve
blessure=Ferite.
se.passe.rien=Non succede niente
au.tour.de=é il turno di
score.des.1=Resultato dadi 1
score.des.2=Resultato dadi 2
joueur1=Giocatore 1
joueur2=Giocatore 2
joueur3=Giocatore 3
joueur4=Giocatore 4
joueur5=Giocatore 5
joueur6=Giocatore 6
joueur7=Giocatore 7
joueur8=Giocatore 8
description.capacite.carte.lieux=Descrizione capacità carta luogo
utiliser.capaciter.lieux=Utilizzare capacità del luogo
sauter.etape=Saltare questa tappa
carte.lieux=Carte luogo
attaquer.joueur=Attaccare un altro giocatore !
piocher.carte=Pescare una carta
carte.tenebre=Carta tenebra
carte.lumiere=Carte luce
attaquer.ou.soigner=Attaccare un giocatore o guarirsi 2 ferite
ne.pas.attaqur=Non attaccare
reveler.identite=Rivelare la sua identità!
c.est=é
faction=Fazione :
utiliser.capacite=Utilizzare capacità
nom.personnages=Nome personaggio
votre.competence=Vostra competenza :
retourner.carte=Girare la carta
benediction=Benedizione
premier.secours=Primi soccorsi
voler.equipement.joueur=Rubate un equipaggiamento al giocatore di vostra scelta
choisir.carte.equipement.a.voler=Clickate sulla carta equipaggiamento che volete rubare
consequence=conseguenza
se.soigner=Guarirsi
mode.claire=Modalità chiaro
musique=Musica
langue=Lingua
parametre=Impostazioni
enregistrer=Registrare
quitter=Uscire
retour=Precedente
vousetes=Voi siete :
voulez.vous.faire.action=Volete faire quest'azione?
oui=si
non=no
choisir.joueur.attaquer=Scegliete un giocatore da attaccare !
stop=Stop
choisir.jouer.a.qui.donner.vision=Scegliete un giocatore da dare la carta visione !
attaquer=Attacco !
voulez.vous.attaquer.joueur=Volete attaccare qualcuno?
arriver.sur.carte.lieux=Arrivate sulla carta luogo
ok=Ok
pause=Pausa
sons=Suoni
jeux=Giochi
reprendre.partie=Riprendere la partita
quitter.jeu=Chiudere la partita
equipement=Equipaggiamenti
glisser.barre=Trascinate la barra
page.precedente=Pagina precedente
page.suivante=Pagina successiva
menu=Menu
vous.avez.obtenu=Avete ottenuto
souhaiter.vous.attaquer=Volete attaccare qualcuno?
souhaiter.vous.activer.effet.lieu=Volete utilizzare l'effetto del luogo?
utilier.effet=Utilizzare effetto
va.user.de.son.pouvoir=utilizzera il suo potere
a.reussi.a.utiliser.son.pouvoir=ha riuscito a utilizzare il suo potere
cacher.carte.vision=Nascondete la carta visione
consulter.sa.carte=Consultare la sua carta
manque.joueur=Mancano dei giocatori per lanciare la partita
ajout.joueur=Aggiunta di un giocatore
desistement=Ritiro di un giocatore
ia.facile=ia facile
ia.moyenne=ia media
ia.difficile=ia difficile
erreur.difficulte=errore difficolta ia
retour.menu=Ritornare al Menu
retour.jeu=Ritornare al gioco
fichier.audio.non.trouver=il file audio non è stato trovato
choisir.joueur.a.qui.voler.equipement=Scegli il giocatore dal quale rubare l'equipaggiamento!
vous.etes.soigne.de=Sei curato
vous.etes.blesser.de=Sei ferito da
souhaiter.vous.attaquer.qq=Attaccheresti qualcuno?
souhaiter.vous.activer.carte.vision=Vuoi attivare l'effetto della carta visione?

View File

@ -1,9 +0,0 @@
package effet;
import main.Joueur;
public abstract class Action {
public abstract void affecte(Joueur j1, Joueur j2);
}

View File

@ -1,53 +0,0 @@
package effet;
import main.Joueur;
public class ActionAltererStatistiquesJoueur extends Action{
private String key;
private int valeur;
private boolean ajouter;
/**
* Constructeur ActionAltererStatistiquesJoueur
* @param key Le clé qui correspond à la valeur à modifier
* @param valeur La valeur
* @param ajouter Permet d'ajouter ou non "valeur" à la valeur précendente
* <br><br>
* Exemple :
* <br><br>
* ActionAltererStatistiquesJoueur("PV", -2, true)
* <br>
* Fait subir 2 PV's de dégâts au joueur
* <br><br>
* ActionAltererStatistiquesJoueur("PV", 2, false)
* <br>
* Change les PV's du joueur à 2
*
*/
public ActionAltererStatistiquesJoueur(String key, int valeur, boolean ajouter)
{
this.key = key;
this.valeur = valeur;
this.ajouter = ajouter;
}
/**
* Lance l'action de modification de statistiques
* @param j1 Le joueur qui modifie
* @param j2 Le joueur dont les statistiques sont modifiées
* @return void
*/
public void affecte(Joueur j1, Joueur j2)
{
if(ajouter)
{
j2.setStat(key, j2.getStat(key)+valeur);
}else {
j2.setStat(key, valeur);
}
}
}

View File

@ -1,33 +0,0 @@
package effet;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import main.Joueur;
public class ActionMultiple extends Action{
private List<Action> actions;
public ActionMultiple(Action...actions)
{
super();
this.actions = new ArrayList<Action>(Arrays.asList(actions));
}
/**
* Lance l'action d'activer toutes les actions contenues dans ActionMultiple.
* @param j1 Le joueur qui lance l'action
* @param j2 Le joueur qui subit l'action
* @return void
*/
@Override
public void affecte(Joueur j1, Joueur j2) {
for(Action action : actions) {
action.affecte(j1, j2);
}
}
}

View File

@ -12,13 +12,11 @@ public class EffetChoisirCible extends Effet{
@Override @Override
public void utiliser(Joueur joueur) { public void utiliser(Joueur joueur) {
Joueur j2 = choisirCible(joueur); Joueur j2 = joueur.choisiParmisTous();
Action action = this.getAction(); Action action = this.getAction();
action.affecte(joueur, j2); action.affecte(joueur, j2);
}
public Joueur choisirCible(Joueur joueur) {
return joueur.choisiParmisTous();
} }
} }

View File

@ -1,30 +1,22 @@
package effet; package effet;
import java.util.Arrays;
import java.util.List;
import main.Joueur; import main.Joueur;
public class EffetChoisirEffet extends Effet{ public class EffetChoisirEffet extends Effet{
private Effet[] effets;
private static final long serialVersionUID = -1412748549517929474L;
private List<Effet> effets;
public EffetChoisirEffet(Effet ...effets) { public EffetChoisirEffet(Effet ...effets) {
super(null); super(null);
this.effets = Arrays.asList(effets); this.effets = effets;
} }
@Override @Override
public void utiliser(Joueur joueur) { public void utiliser(Joueur joueur) {
Effet e = choisirEffet(joueur); Effet effet = joueur.choisir(effets);
e.utiliser(joueur);
}
public Effet choisirEffet(Joueur joueur) { effet.utiliser(joueur);
return (Effet) joueur.choisir(effets,Effet.class);
} }
} }

View File

@ -46,7 +46,7 @@ public class ActionAltererStatistiquesJoueur extends Action{
{ {
j2.addToStat(key, valeur); j2.addToStat(key, valeur);
}else { }else {
j2.updateStat(key, valeur); j2.setStat(key, valeur);
} }
} }
@ -58,30 +58,8 @@ public class ActionAltererStatistiquesJoueur extends Action{
this.valeur = valeur; this.valeur = valeur;
} }
public String getKey() {
return this.key;
}
@Override @Override
public String toString(){ public String toString(){
return this.key+" "+this.valeur+" "+this.ajouter;
String mot1 = "";
String mot2 = "";
if(this.ajouter) {
if(valeur < 0) {
mot1 = "Retirer";
}else {
mot1 = "Ajouter";
}
mot2 = " au ";
}else {
mot1 = "Placer à";
mot2 = " le ";
}
return mot1+" "+Math.abs(valeur)+" "+key+mot2+"joueur";
} }
} }

View File

@ -33,9 +33,4 @@ public class ActionAltererStatistiquesJoueurRoll extends ActionAltererStatistiqu
super.affecte(j1, j2); super.affecte(j1, j2);
} }
@Override
public String toString(){
return "Lancer un dé "+valeurRoll+" pour modifier les "+this.getKey()+" du joueur";
}
} }

View File

@ -19,9 +19,4 @@ public class ActionAttaquer extends Action {
} }
@Override
public String toString() {
return "Attaquer un joueur";
}
} }

View File

@ -33,9 +33,4 @@ public class ActionMultiple extends Action{
action.affecte(j1, j2); action.affecte(j1, j2);
} }
} }
public List<Action> getList(){
return this.actions;
}
} }

View File

@ -1,24 +0,0 @@
package effet.action;
import main.Joueur;
public class ActionMultipleChoisir extends ActionMultiple{
public ActionMultipleChoisir(Action...actions) {
super(actions);
}
/**
* Lance l'action d'activer toutes les actions contenues dans ActionMultiple.
* @param j1 Le joueur qui lance l'action
* @param j2 Le joueur qui subit l'action
* @return void
*/
@Override
public void affecte(Joueur j1, Joueur j2) {
Action a = (Action) j1.choisir(this.getList(), Action.class);
a.affecte(j1, j2);
}
}

View File

@ -14,8 +14,4 @@ public class ActionReveal extends Action {
j2.reveal(); j2.reveal();
} }
@Override
public String toString() {
return "Se réveler";
}
} }

View File

@ -3,7 +3,6 @@ package effet.action;
import java.util.List; import java.util.List;
import carte.CarteEquipement; import carte.CarteEquipement;
import javafx.scene.control.Label;
import main.Joueur; import main.Joueur;
public class ActionVoler extends Action{ public class ActionVoler extends Action{
@ -33,29 +32,24 @@ public class ActionVoler extends Action{
@Override @Override
public void affecte(Joueur j1, Joueur j2) { public void affecte(Joueur j1, Joueur j2) {
List<CarteEquipement> equipements = j2.getEquipements();
if(!equipements.isEmpty()) {
CarteEquipement equipement = null;
if(this.choix) { if(this.choix) {
// J1 choisit quel équipement voler
equipement = (CarteEquipement) j1.choisir(equipements, CarteEquipement.class); List<CarteEquipement> equipements = j2.getEquipements();
}else {
// J1 choisit quel équipement voler // J1 choisit quel équipement voler
equipement = (CarteEquipement) j2.choisir(equipements,CarteEquipement.class); CarteEquipement equipement = (CarteEquipement) j1.choisir(equipements);
}
j1.voler(j2,equipement); j1.voler(j2,equipement);
} }else {
List<CarteEquipement> equipements = j1.getEquipements();
// J1 choisit quel équipement voler
CarteEquipement equipement = (CarteEquipement) j1.choisir(equipements);
j2.voler(j1,equipement);
} }
@Override
public String toString() {
return "Voler un autre joueur";
} }
} }

View File

View File

@ -3,17 +3,10 @@ package ihm;
public class Couple { public class Couple {
private String nom; private String nom;
private boolean ia; // true -> joueur virtuel private boolean ia; // true -> joueur virtuel
private int lvlIa;
public Couple (String nom) { public Couple (String nom, boolean ia) {
this.nom = nom; this.nom = nom;
this.ia = false; this.ia = ia;
}
public Couple (String nom, int niveau) {
this.nom = nom;
this.lvlIa = niveau;
this.ia = true;
} }
public String getNom() { public String getNom() {
@ -24,7 +17,6 @@ public class Couple {
this.nom = nom; this.nom = nom;
} }
public boolean isIa() { public boolean isIa() {
return ia; return ia;
} }
@ -33,14 +25,4 @@ public class Couple {
this.ia = ia; this.ia = ia;
} }
public int getLvlIa() {
return lvlIa;
}
public void setLvlIa(int lvlIa) {
this.lvlIa = lvlIa;
}
} }

View File

@ -1,40 +0,0 @@
package ihm;
//adaptation du code a la source : https://stackoverflow.com/questions/50021161/java-how-to-update-dice-image-when-button-clicked-and-equal-to-number-given
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
/**
*
* @author blj0011
*/
public class Die {
ImageView dieFace;
Image[] images;
int currentFace;
public Die(Image[] images) {
this.images = images;
dieFace = new ImageView(this.images[0]);// set default to image 0
}
public Die(Image[] images, int dieFaceValue) {
// Need to catch for values less than 1 and greater than 6!
this.images = images;
dieFace = new ImageView(this.images[dieFaceValue - 1]);
}
public ImageView getdieFace() {
return dieFace;
}
public int getCurrentFace() {
return currentFace;
}
public void setDieFace(int dieFaceValue) {
// Need to catch for values less than 1 and greater than 6!
dieFace.setImage(this.images[dieFaceValue - 1]);
currentFace = dieFaceValue;
}
}

View File

@ -1,60 +0,0 @@
package ihm;
//adaptation du code a la source : https://stackoverflow.com/questions/50021161/java-how-to-update-dice-image-when-button-clicked-and-equal-to-number-given
import javafx.scene.image.Image;
/**
*
* @author blj0011
*/
public class DieImages {
final Image die1 = new Image(getClass().getResourceAsStream("ressources/img/des1.png"));
final Image die2 = new Image(getClass().getResourceAsStream("ressources/img/des2.png"));
final Image die3 = new Image(getClass().getResourceAsStream("ressources/img/des3.png"));
final Image die4 = new Image(getClass().getResourceAsStream("ressources/img/des4.png"));
final Image die5 = new Image(getClass().getResourceAsStream("ressources/img/des5.png"));
final Image die6 = new Image(getClass().getResourceAsStream("ressources/img/des6.png"));
final Image dief1 = new Image(getClass().getResourceAsStream("ressources/img/desf1.png"));
final Image dief2 = new Image(getClass().getResourceAsStream("ressources/img/desf2.png"));
final Image dief3 = new Image(getClass().getResourceAsStream("ressources/img/desf3.png"));
final Image dief4 = new Image(getClass().getResourceAsStream("ressources/img/desf4.png"));
final Image[] images = new Image[6];
int taille;
public DieImages(int i) {
switch (i) {
case 6:
images[0] = die1;
images[1] = die2;
images[2] = die3;
images[3] = die4;
images[4] = die5;
images[5] = die6;
taille = 6;
break;
case 4:
images[0] = dief1;
images[1] = dief2;
images[2] = dief3;
images[3] = dief4;
taille = 4;
break;
default:
images[0] = die1;
images[1] = die2;
images[2] = die3;
images[3] = die4;
images[4] = die5;
images[5] = die6;
taille = 6;
}
}
public Image[] getImages() {
return images;
}
}

View File

@ -6,7 +6,6 @@ import java.io.InputStream;
import javax.sound.sampled.AudioInputStream; import javax.sound.sampled.AudioInputStream;
import javax.sound.sampled.AudioSystem; import javax.sound.sampled.AudioSystem;
import javax.sound.sampled.Clip; import javax.sound.sampled.Clip;
import javax.sound.sampled.FloatControl;
public class EffetSonore { public class EffetSonore {
@ -14,8 +13,6 @@ public class EffetSonore {
public InputStream fileSound1 = getClass().getResourceAsStream("/ihm/ressources/musique/BEEP1.wav"); public InputStream fileSound1 = getClass().getResourceAsStream("/ihm/ressources/musique/BEEP1.wav");
public InputStream fileSound2 = getClass().getResourceAsStream("/ihm/ressources/musique/BeepError.wav"); public InputStream fileSound2 = getClass().getResourceAsStream("/ihm/ressources/musique/BeepError.wav");
public static FloatControl volumeEffet;
public static float lvVolumeEffet;
public static void playSoundEffect(InputStream path) { public static void playSoundEffect(InputStream path) {
@ -32,10 +29,6 @@ public class EffetSonore {
AudioInputStream audioInput = AudioSystem.getAudioInputStream(bufferedIn); AudioInputStream audioInput = AudioSystem.getAudioInputStream(bufferedIn);
Clip clipSound = AudioSystem.getClip(); Clip clipSound = AudioSystem.getClip();
clipSound.open(audioInput); clipSound.open(audioInput);
volumeEffet = (FloatControl) clipSound.getControl(FloatControl.Type.MASTER_GAIN);
volumeEffet.setValue(lvVolumeEffet);
clipSound.start(); clipSound.start();
} else { } else {
@ -47,6 +40,7 @@ public class EffetSonore {
} }
} }
} }
public static boolean isSoundOK() { public static boolean isSoundOK() {
@ -57,8 +51,10 @@ public class EffetSonore {
EffetSonore.soundOK = soundOK; EffetSonore.soundOK = soundOK;
} }
public static void setVolumeEffets(double dValeur) {
lvVolumeEffet = (float) (dValeur);
}
} }

View File

@ -1,30 +0,0 @@
package ihm;
import carte.CarteEquipement;
import ihm.controller.PlateauController;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
public class ImageViewEquipement extends ImageView{
private CarteEquipement ce;
public ImageViewEquipement(CarteEquipement ce) {
this.ce = ce;
Image im = PlateauController.getImageCarte(ce);
this.setImage(im);
}
public CarteEquipement getCp() {
return ce;
}
public void setCp(CarteEquipement ce) {
this.ce = ce;
}
public boolean contains(CarteEquipement ce) {
return this.ce == ce;
}
}

View File

@ -1,11 +1,9 @@
package ihm; package ihm;
import java.net.URL; import java.net.URL;
import java.util.Locale; import java.util.Locale;
import java.util.ResourceBundle; import java.util.ResourceBundle;
import database.CreatingCardsTest;
import database.RessourceLoader;
import ihm.controller.ParametreController;
import javafx.application.Application; import javafx.application.Application;
import javafx.event.EventHandler; import javafx.event.EventHandler;
import javafx.fxml.FXMLLoader; import javafx.fxml.FXMLLoader;
@ -16,20 +14,15 @@ import javafx.stage.WindowEvent;
import main.GestionnaireJeu; import main.GestionnaireJeu;
public class Main extends Application { public class Main extends Application {
/*GraphicsDevice Gd = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();
int width = Gd.getDisplayMode().getWidth();
int height = Gd.getDisplayMode().getHeight(); */
@Override @Override
public void start(Stage primaryStage) throws Exception { public void start(Stage primaryStage) throws Exception {
final URL fxmlURL = getClass().getResource("ressources/Menu.fxml"); final URL fxmlURL = getClass().getResource("ressources/Menu.fxml");
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", ParametreController.LaLangue); final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", Locale.FRANCE);
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle); final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
Pane root = fxmlLoader.load(); Pane root = fxmlLoader.load();
primaryStage.setTitle("Shadow Hunters"); primaryStage.setTitle("Shadow Hunters");
primaryStage.setScene(new Scene(root)); primaryStage.setScene(new Scene(root));
primaryStage.setMaximized(true);
primaryStage.centerOnScreen(); primaryStage.centerOnScreen();
primaryStage.setOnCloseRequest(new EventHandler<WindowEvent>() { primaryStage.setOnCloseRequest(new EventHandler<WindowEvent>() {
@Override @Override
@ -42,11 +35,13 @@ public class Main extends Application {
} }
public static void main(String[] args) { public static void main(String[] args) {
CreatingCardsTest.init();
GestionnaireJeu gj = GestionnaireJeu.getGestionnaireJeu(); GestionnaireJeu gj = GestionnaireJeu.getGestionnaireJeu();
/*
RessourceLoader rl = new RessourceLoader(); RessourceLoader rl = new RessourceLoader();
rl.loadRessources(); rl.loadRessources();
gj.setRessourceLoader(rl); gj.setRessourceLoader(rl);
*/
launch(args); launch(args);
} }
} }

View File

@ -14,7 +14,7 @@ public class Musique {
public static long clipTimePosition = 0; public static long clipTimePosition = 0;
public static boolean musiqueEnCours = false; public static boolean musiqueEnCours = false;
public static FloatControl volume ; static FloatControl volume ;
public static void playMusique(InputStream path) { public static void playMusique(InputStream path) {
@ -62,13 +62,4 @@ public class Musique {
volume.setValue(volume.getValue() -valeur); volume.setValue(volume.getValue() -valeur);
} }
public static void setVolume(Float fValeur) {
volume.setValue(fValeur);
}
public static void setVolume(double dValeur) {
float decibel = (float) (Math.log(dValeur) / Math.log(10) * 20);
volume.setValue(decibel);
}
} }

View File

@ -63,15 +63,6 @@ public class PopUp{
}); });
} }
public Stage getStage() {
return popup;
}
public Scene getScene() {
return scene;
}
public void display() { public void display() {
popup.setScene(scene); popup.setScene(scene);

View File

@ -1,28 +0,0 @@
package ihm.controller;
import java.net.URL;
import java.util.ResourceBundle;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.Label;
public class AlterationVieZJ implements Initializable {
@FXML private Label label;
private ResourceBundle bundle1 = ResourceBundle.getBundle("domaine.properties.langue", ParametreController.LaLangue);
@Override
public void initialize(URL arg0, ResourceBundle arg1) {
}
public void changeLabel(int valeur) {
if(valeur > 0 ) {
this.label.setText(bundle1.getString("vous.etes.soigne.de")+valeur+"PV");
}else {
this.label.setText(bundle1.getString("vous.etes.blesser.de")+valeur+"PV");
}
}
}

View File

@ -1,34 +1,20 @@
package ihm.controller; package ihm.controller;
import java.net.URL; import java.net.URL;
import java.util.List;
import java.util.ResourceBundle; import java.util.ResourceBundle;
import javafx.animation.KeyFrame;
import javafx.animation.Timeline;
import javafx.fxml.FXML; import javafx.fxml.FXML;
import javafx.fxml.Initializable; import javafx.fxml.Initializable;
import javafx.scene.control.Button; import javafx.scene.control.Button;
import javafx.scene.control.Label; import javafx.scene.control.Label;
import javafx.util.Duration;
import main.Contexte;
import main.ControleurIA;
import main.GestionnaireJeu; import main.GestionnaireJeu;
import main.Joueur;
import main.JoueurVirtuel;
public class ChoisirBoolean implements Initializable { public class ChoisirBoolean implements Initializable {
@FXML @FXML private Button ouiButton;
private Button ouiButton; @FXML private Button nonButton;
@FXML @FXML private Label titre;
private Button nonButton;
@FXML
private Label titre;
private boolean result; private boolean result;
private ResourceBundle bundle1 = ResourceBundle.getBundle("domaine.properties.langue", ParametreController.LaLangue);
@Override @Override
public void initialize(URL arg0, ResourceBundle arg1) { public void initialize(URL arg0, ResourceBundle arg1) {
@ -68,67 +54,7 @@ public class ChoisirBoolean implements Initializable {
return titre; return titre;
} }
public void setTitre(Contexte c) { public void setTitre(Label titre) {
switch(c) { this.titre = titre;
case ATTAQUER:
titre.setText(bundle1.getString("souhaiter.vous.attaquer.qq"));
break;
case ACTIVER_EFFET_LIEU :
titre.setText(bundle1.getString("souhaiter.vous.activer.effet.lieu"));
break;
case CHOISIR_VISION :
titre.setText(bundle1.getString("souhaiter.vous.activer.carte.vision"));
break;
default:
}
}
public void fireBtnIAEffetLieu() {
ControleurIA cIA = new ControleurIA();
ouiButton.setDisable(true);
nonButton.setDisable(true);
Timeline timeline = new Timeline(new KeyFrame(Duration.millis(2000), ae -> {
if (cIA.choixUtiliserPouvoirLieu()) {
ouiButton.setDisable(false);
ouiButton.fire();
} else {
nonButton.setDisable(false);
nonButton.fire();
}
}));
timeline.play();
}
public void fireBtnIAVision() {
ControleurIA cIA = new ControleurIA();
ouiButton.setDisable(true);
nonButton.setDisable(true);
Timeline timeline = new Timeline(new KeyFrame(Duration.millis(2000), ae -> {
if (cIA.mentirIAMetamorphe()) {
ouiButton.setDisable(false);
ouiButton.fire();
} else {
nonButton.setDisable(false);
nonButton.fire();
}
}));
timeline.play();
}
public void fireBtnIAattaquer(JoueurVirtuel jIA, List<Joueur> joueursLieu) {
ControleurIA cIA = new ControleurIA();
ouiButton.setDisable(true);
nonButton.setDisable(true);
Timeline timeline = new Timeline(new KeyFrame(Duration.millis(2000), ae -> {
if (cIA.choixSiAttaquer(jIA, joueursLieu)) {
ouiButton.setDisable(false);
ouiButton.fire();
} else {
nonButton.setDisable(false);
nonButton.fire();
}
}));
timeline.play();
} }
} }

View File

@ -1,34 +1,38 @@
package ihm.controller; package ihm.controller;
import java.io.InputStream;
import java.net.URL; import java.net.URL;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.ResourceBundle; import java.util.ResourceBundle;
import carte.CarteEquipement;
import javafx.animation.KeyFrame;
import javafx.animation.Timeline;
import javafx.fxml.FXML; import javafx.fxml.FXML;
import javafx.fxml.Initializable; import javafx.fxml.Initializable;
import javafx.scene.control.Button; import javafx.scene.image.Image;
import javafx.scene.image.ImageView; import javafx.scene.image.ImageView;
import javafx.scene.layout.GridPane; import javafx.scene.layout.GridPane;
import javafx.scene.layout.HBox; import carte.CarteEquipement;
import javafx.util.Duration;
import main.Contexte;
import main.GestionnaireJeu;
import main.Joueur;
import main.JoueurVirtuel;
public class ChoisirEquipement implements Initializable{ public class ChoisirEquipement implements Initializable{
@FXML private GridPane grilleEquipement; @FXML private GridPane grilleEquipement;
@FXML private HBox hbox;
private List<CarteEquipement> equipements = new ArrayList<CarteEquipement>(); private List<CarteEquipement> equipements = new ArrayList<CarteEquipement>();
private CarteEquipement equipementSelected; private CarteEquipement equipementSelected;
@Override @Override
public void initialize(URL arg0, ResourceBundle arg1) { public void initialize(URL arg0, ResourceBundle arg1) {
for (int i=0; i<equipements.size(); i++) {
ImageView carte = (ImageView) grilleEquipement.getChildren().get(i);
/*InputStream input = getClass().getResourceAsStream("/ihm/ressources/img/" + "nomcarte" + ".png");
Image image = new Image(input);
carte.setImage(image);*/
int numEquipement = i;
carte.setOnMouseClicked(e -> {
equipementSelected = equipements.get(numEquipement);
});
}
} }
public List<CarteEquipement> getEquipements() { public List<CarteEquipement> getEquipements() {
@ -55,37 +59,4 @@ public class ChoisirEquipement implements Initializable{
this.grilleEquipement = grilleEquipement; this.grilleEquipement = grilleEquipement;
} }
public CarteEquipement getResult() {
return equipementSelected;
}
public void setListCarteEquipements(List<CarteEquipement> lce) {
this.equipements = lce;
}
public void initChoisirEquipement() {
for (CarteEquipement ce : equipements) {
ImageView iv = new ImageView(PlateauController.getImageCarte(ce));
iv.setFitHeight(100);
iv.setFitHeight(100);
iv.setPreserveRatio(true);
hbox.getChildren().add(iv);
iv.setOnMouseClicked(e -> {
equipementSelected = ce;
GestionnaireJeu.notifyPlateau();
});
}
}
public void fireBtnIA(JoueurVirtuel jIA, Contexte c) {
Timeline timeline = new Timeline(new KeyFrame(Duration.millis(2000), ae -> {
equipementSelected = jIA.choisirEquipement(equipements);
GestionnaireJeu.notifyPlateau();
}));
timeline.play();
}
} }

View File

@ -1,106 +1,44 @@
package ihm.controller; package ihm.controller;
import java.net.URL; import java.net.URL;
import java.util.ArrayList;
import java.util.List;
import java.util.ResourceBundle; import java.util.ResourceBundle;
import javafx.animation.KeyFrame;
import javafx.animation.Timeline;
import javafx.fxml.FXML; import javafx.fxml.FXML;
import javafx.fxml.Initializable; import javafx.fxml.Initializable;
import javafx.scene.control.Button;
import javafx.scene.control.Label; import javafx.scene.control.Label;
import javafx.scene.layout.HBox; import javafx.scene.layout.HBox;
import javafx.util.Duration;
import main.Contexte;
import main.GestionnaireJeu;
import main.Joueur;
import main.JoueurVirtuel;
public class ChoisirJoueur implements Initializable{ public class ChoisirJoueur implements Initializable{
@FXML @FXML private HBox joueurHaut;
private HBox joueurHaut; @FXML private HBox joueurBas;
@FXML @FXML private Label titre;
private HBox joueurBas;
@FXML
private Label titre;
@FXML
private Button btn1;
@FXML
private Button btn2;
@FXML
private Button btn3;
@FXML
private Button btn4;
@FXML
private Button btn5;
@FXML
private Button btn6;
@FXML
private Button btn7;
@FXML
private Button btn8;
private JoueurIHM joueurSelected;
private List<JoueurIHM> listJoueursIHM;
private List<Button> buttons;
private ResourceBundle bundle1 = ResourceBundle.getBundle("domaine.properties.langue", ParametreController.LaLangue);
private int joueurSelected;
@Override @Override
public void initialize(URL arg0, ResourceBundle arg1) { public void initialize(URL arg0, ResourceBundle arg1) {
for (int i=0; i<joueurHaut.getChildren().size(); i++) {
this.buttons = new ArrayList<Button>(); int numJoueur = i;
joueurHaut.getChildren().get(i).setOnMouseClicked(e -> {
this.buttons.add(btn1); System.out.println("Vous avez choisi le joueur " + (numJoueur+1));
this.buttons.add(btn2); this.joueurSelected = numJoueur;
this.buttons.add(btn3);
this.buttons.add(btn4);
this.buttons.add(btn5);
this.buttons.add(btn6);
this.buttons.add(btn7);
this.buttons.add(btn8);
}
public void initButtons() {
int i = 0;
while (i < listJoueursIHM.size()) {
Button b = this.buttons.get(i);
JoueurIHM jihm = listJoueursIHM.get(i);
b.setOnAction(e -> {
GestionnaireJeu.notifyPlateau();
this.joueurSelected = jihm;
}); });
System.out.println("b.gettext = " + b.getText());
System.out.println("jihm.getnom = " + jihm.getNom());
b.setText(jihm.getNom());
i++;
} }
for (int j = i; j < buttons.size(); j++) { for (int i=0; i<joueurBas.getChildren().size(); i++) {
Button b = this.buttons.get(j); int numJoueur = i+4;
b.setVisible(false); joueurBas.getChildren().get(i).setOnMouseClicked(e -> {
System.out.println("Vous avez choisi le joueur " + (numJoueur+1));
this.joueurSelected = numJoueur;
});
} }
} }
//GETTERS AND SETTERS //GETTERS AND SETTERS
public HBox getJoueurHaut() { public HBox getJoueurHaut() {
return joueurHaut; return joueurHaut;
} }
public HBox getHBox(int valeur) {
if (valeur < 4) {
return joueurHaut;
} else {
return joueurBas;
}
}
public void setJoueurHaut(HBox joueurHaut) { public void setJoueurHaut(HBox joueurHaut) {
this.joueurHaut = joueurHaut; this.joueurHaut = joueurHaut;
} }
@ -117,50 +55,15 @@ public class ChoisirJoueur implements Initializable {
return titre; return titre;
} }
public void setTitre(Contexte c) { public void setTitre(Label titre) {
switch (c) { this.titre = titre;
case ATTAQUER:
titre.setText(bundle1.getString("choisir.joueur.attaquer"));
break;
case CHOISIR_VISION:
titre.setText(bundle1.getString("choisir.jouer.a.qui.donner.vision"));
break;
case VOLER_EQUIP:
titre.setText(bundle1.getString("choisir.joueur.a.qui.voler.equipement"));
break;
default:
}
} }
public JoueurIHM getJoueurSelected() { public int getJoueurSelected() {
return joueurSelected; return joueurSelected;
} }
public void setListJoueursIHM(List<JoueurIHM> joueursIHM) { public void setJoueurSelected(int joueurSelected) {
this.listJoueursIHM = joueursIHM; this.joueurSelected = joueurSelected;
}
public void fireBtnIA(JoueurVirtuel jIA, Contexte c) {
for (Button b : buttons)
b.setDisable(true);
Timeline timeline = new Timeline(new KeyFrame(Duration.millis(2000), ae -> {
List<Joueur> joueurs = new ArrayList<>();
for (JoueurIHM jihm : listJoueursIHM) {
joueurs.add(jihm.getJoueur());
}
Joueur jchoisi = jIA.choisirJoueur(joueurs, c);
int i = 0;
boolean found = false;
while (!found && i < listJoueursIHM.size()) {
if (listJoueursIHM.get(i).getJoueur().equals(jchoisi)) {
found = true;
buttons.get(i).setDisable(false);
buttons.get(i).fire();
}
i++;
}
}));
timeline.play();
} }
} }

View File

@ -1,7 +1,5 @@
package ihm.controller; package ihm.controller;
import java.util.ResourceBundle;
import javafx.scene.control.Label; import javafx.scene.control.Label;
import javafx.scene.layout.Pane; import javafx.scene.layout.Pane;
import main.Contexte; import main.Contexte;
@ -10,18 +8,16 @@ public abstract class ContexteInterpreter {
public static void setContexteToPane(Contexte contexte, Pane root) { public static void setContexteToPane(Contexte contexte, Pane root) {
ResourceBundle bundle1 = ResourceBundle.getBundle("domaine.properties.langue", ParametreController.LaLangue);
if(contexte.equals(Contexte.ATTAQUER)) { if(contexte.equals(Contexte.ATTAQUER)) {
Label l = (Label) root.getChildren().get(0); Label l = (Label) root.getChildren().get(0);
l.setText(bundle1.getString("souhaiter.vous.attaquer")); l.setText("Souhaitez vous attaquer ?");
} }
if(contexte.equals(Contexte.ACTIVER_EFFET_LIEU)) { if(contexte.equals(Contexte.ACTIVER_EFFET_LIEU)) {
Label l = (Label) root.getChildren().get(0); Label l = (Label) root.getChildren().get(0);
l.setText(bundle1.getString("souhaiter.vous.activer.effet.lieu")); l.setText("Souhaitez vous activer l'effet du lieu ?");
} }
} }

View File

@ -1,28 +0,0 @@
package ihm.controller;
import java.net.URL;
import java.util.ResourceBundle;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import main.GestionnaireJeu;
public class Dialog implements Initializable {
@FXML private Button button;
@FXML private Label label;
@Override
public void initialize(URL arg0, ResourceBundle arg1) {
button.setOnAction(x -> {
GestionnaireJeu.notifyPlateau();
});
}
public void setText(String text) {
this.label.setText(text);
}
}

View File

@ -1,133 +0,0 @@
package ihm.controller;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
import java.util.ResourceBundle;
import ihm.EffetSonore;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.fxml.Initializable;
import javafx.geometry.Pos;
import javafx.scene.Node;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.scene.input.MouseEvent;
import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.HBox;
import javafx.scene.layout.Pane;
import javafx.scene.layout.VBox;
import javafx.scene.text.Font;
import javafx.stage.Stage;
import main.Joueur;
public class FinDePartieControlleur implements Initializable {
@FXML private Pane rootPane;
@FXML private Label labelWinner;
@FXML private VBox vbListeWinner;
public static List<Joueur> listeWinner = new ArrayList<Joueur>();
//public static List<Image> listeImageCarte = new ArrayList<Image>();
/*
//initialise pour faire des test (a supprimer)
private Joueur j1 = new Joueur("Joueur1");
private Joueur j2 = new Joueur("Joueur2");
private Joueur j3 = new Joueur("Joueur3");
private Joueur j4 = new Joueur("Joueur4");
private Joueur j5 = new Joueur("Joueur5");
private Joueur j6 = new Joueur("Joueur6");
*/
@Override
public void initialize(URL arg0, ResourceBundle arg1) {
/*
//initialise pour faire des test (a supprimer)
listeWinner.add(j1);
listeWinner.add(j2);
listeWinner.add(j3);
listeWinner.add(j4);
listeWinner.add(j5);
listeWinner.add(j6);
listeImageCarte.add(PlateauController.getImageDosCarte(RessourceLoader.DOS_LUMIERE));
listeImageCarte.add(PlateauController.getImageDosCarte(RessourceLoader.CARTES_TENEBRE));
listeImageCarte.add(PlateauController.getImageDosCarte(RessourceLoader.DOS_VISION));
*/
for(int i = 0 ; i<listeWinner.size(); i++) {
HBox JVainqueur = new HBox();
JVainqueur.setAlignment(Pos.CENTER);
/*
//pour mettre une image de la carte perso du joueur :
ImageView ivJoueur = new ImageView();
Image im = listeImageCarte.get(i);
ivJoueur.setImage(im);
JVainqueur.getChildren().add(ivJoueur);
*/
Label nomJoueurGagant = new Label();
nomJoueurGagant.setText(listeWinner.get(i).getNom() + " qui était "+ listeWinner.get(i).getCartePersonnage().getNom() + " ("+listeWinner.get(i).getCartePersonnage().getEquipe()+ ")");
nomJoueurGagant.setFont(new Font("Arial", 36));
nomJoueurGagant.setStyle("-fx-text-fill: white");
JVainqueur.getChildren().add(nomJoueurGagant);
vbListeWinner.getChildren().add(JVainqueur);
}
vbListeWinner.setSpacing(30);
}
@FXML
public void retourMenu(MouseEvent mouseEvent) throws IOException {
InputStream fileSound1 = getClass().getResourceAsStream("/ihm/ressources/musique/BEEP1.wav");
EffetSonore.playSoundEffect(fileSound1);
System.out.println("Retour au Menu");
final URL fxmlURL = getClass().getResource("/ihm/ressources/Menu.fxml");
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", ParametreController.LaLangue);
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
AnchorPane pane = fxmlLoader.load();
Scene scene = new Scene(pane);
Stage appStage = (Stage) ((Node) mouseEvent.getSource()).getScene().getWindow();
appStage.setScene(scene);
appStage.show();
}
public List<Joueur> getListeWinner() {
return listeWinner;
}
public void setListeWinner(List<Joueur> listeWinner) {
FinDePartieControlleur.listeWinner = listeWinner;
}
/*
public static List<Image> getListeImageCarte() {
return listeImageCarte;
}
public static void setListeImageCarte(List<Image> listeImageCarte) {
FinDePartieControlleur.listeImageCarte = listeImageCarte;
}
*/
}

View File

@ -44,7 +44,8 @@ public class GestionnaireDePions {
StackPane nNew = (StackPane) gp.getChildren().get(damage); StackPane nNew = (StackPane) gp.getChildren().get(damage);
FlowPane fpNew = (FlowPane) nNew.getChildren().get(0); FlowPane fpNew = (FlowPane) nNew.getChildren().get(0);
if(!fpNew.getChildren().contains(pionVie)) fpNew.getChildren().add(pionVie); fpNew.getChildren().add(pionVie);
} }
@ -65,10 +66,9 @@ public class GestionnaireDePions {
} }
StackPane sp = (StackPane) hbox.getChildren().get(indexCL%2); StackPane sp = (StackPane) hbox.getChildren().get(indexCL%2);
FlowPane fp = (FlowPane) sp.getChildren().get(1); FlowPane fp = (FlowPane) sp.getChildren().get(0);
if(!fp.getChildren().contains(this.pionLieu)) fp.getChildren().add(this.pionLieu);
fp.getChildren().add(this.pionLieu);
} }
@ -79,7 +79,7 @@ public class GestionnaireDePions {
translate.setByX(x); translate.setByX(x);
translate.setByY(y); translate.setByY(y);
translate.setDuration(Duration.millis(20000)); translate.setDuration(Duration.millis(2000));
translate.setNode(p); translate.setNode(p);
translate.play(); translate.play();
} }

View File

@ -0,0 +1,20 @@
package ihm.controller;
import java.net.URL;
import java.util.ResourceBundle;
import javafx.fxml.FXML;
import javafx.scene.control.Label;
import main.Joueur;
public class JouerSonTour4Controller extends LancerDes{
@FXML private Label defenseur;
private Joueur j;
@Override
public void initialize(URL arg0, ResourceBundle arg1) {
super.initialize(arg0, arg1);
//defenseur.setText(j.getNom());
}
}

View File

@ -1,21 +1,7 @@
package ihm.controller; package ihm.controller;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.ResourceBundle;
import carte.CarteEquipement;
import database.RessourceLoader;
import ihm.EffetSonore;
import ihm.ImageViewEquipement;
import javafx.application.Platform;
import javafx.scene.Node;
import javafx.scene.control.Button; import javafx.scene.control.Button;
import javafx.scene.control.Label; import javafx.scene.control.Label;
import javafx.scene.control.ScrollPane;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView; import javafx.scene.image.ImageView;
import javafx.scene.layout.AnchorPane; import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.Border; import javafx.scene.layout.Border;
@ -24,7 +10,6 @@ import javafx.scene.layout.BorderStrokeStyle;
import javafx.scene.layout.BorderWidths; import javafx.scene.layout.BorderWidths;
import javafx.scene.layout.CornerRadii; import javafx.scene.layout.CornerRadii;
import javafx.scene.layout.GridPane; import javafx.scene.layout.GridPane;
import javafx.scene.layout.HBox;
import javafx.scene.layout.Pane; import javafx.scene.layout.Pane;
import javafx.scene.paint.Color; import javafx.scene.paint.Color;
import main.Joueur; import main.Joueur;
@ -36,65 +21,35 @@ public class JoueurIHM {
private Pane zoneJoueur; private Pane zoneJoueur;
private GestionnaireDePions gestionnaireDePions; private GestionnaireDePions gestionnaireDePions;
private Color color; private Color color;
private PlateauController pc;
private boolean estRevele = false;
ResourceBundle bundle1 = ResourceBundle.getBundle("domaine.properties.langue", ParametreController.LaLangue);
public JoueurIHM(int i, Joueur joueur, Pane zoneJoueur, Color color, GridPane gridPaneVie, GridPane gridPaneLieux) {
public JoueurIHM(int i, Joueur joueur, Pane zoneJoueur, Color color, GridPane gridPaneVie, GridPane gridPaneLieux,
PlateauController pc /* , boolean carteVisible */ ) {
this.setPosition(i); this.setPosition(i);
this.setJoueur(joueur); this.setJoueur(joueur);
this.zoneJoueur = zoneJoueur; this.zoneJoueur = zoneJoueur;
this.color = color; this.color = color;
this.gestionnaireDePions = new GestionnaireDePions(this.color,gridPaneVie, gridPaneLieux); this.gestionnaireDePions = new GestionnaireDePions(this.color,gridPaneVie, gridPaneLieux);
this.pc = pc;
zoneJoueur.setBorder( zoneJoueur.setBorder(new Border(new BorderStroke(color, BorderStrokeStyle.SOLID, CornerRadii.EMPTY, new BorderWidths(5))));
new Border(new BorderStroke(color, BorderStrokeStyle.SOLID, CornerRadii.EMPTY, new BorderWidths(5))));
String name = joueur.getNom(); String name = joueur.getNom();
setLabelJoueur(name); setLabelJoueur(name);
initRevealButton(); initRevealButton();
initCheckIdentity();
initZoneEquipement();
}
private void initZoneEquipement() {
HBox hb = getPaneEquipement();
} }
private void initRevealButton() { private void initRevealButton() {
Button btn = getRevealButton(); Button btn = getRevealButton();
btn.setOnAction(x -> { btn.setOnAction(x -> {
this.joueur.setRevele(true);;
actionReveler(btn);
});
}
public void reveler() {
Button btn = getRevealButton();
actionReveler(btn);
}
private void actionReveler(Button btn) {
InputStream fileSound1 = getClass().getResourceAsStream("/ihm/ressources/musique/BEEP1.wav");
EffetSonore.playSoundEffect(fileSound1);
this.joueur.reveal();
ImageView iv = this.getCartePersonnage(); ImageView iv = this.getCartePersonnage();
System.out.println(this.joueur.getCartePersonnage()); // TODO
Image im = this.pc.getImageCarte(this.joueur.getCartePersonnage()); //this.joueur.getCartePersonnage().getId();
GridPane gp = (GridPane) iv.getParent(); //iv.setImage(arg0);
iv.setImage(im); System.out.println(joueur.getRevele());
iv.fitHeightProperty().bind(gp.heightProperty()); btn.setDisable(true);
initButtonEffect(btn); });
btn.setText(bundle1.getString("utilier.effet"));
estRevele = true;
} }
public Button getRevealButton() { public Button getRevealButton() {
@ -102,90 +57,16 @@ public class JoueurIHM {
return (Button) p.getChildren().get(1); return (Button) p.getChildren().get(1);
} }
private void initCheckIdentity() {
ImageView iv = getCartePersonnage();
iv.setOnMousePressed(press -> {
if (estRevele == false) {
Image im = this.pc.getImageCarte(this.joueur.getCartePersonnage());
GridPane gp = (GridPane) iv.getParent();
iv.setImage(im);
iv.fitHeightProperty().bind(gp.heightProperty());
iv.fitHeightProperty().bind(gp.heightProperty());
}
});
iv.setOnMouseReleased(release -> {
if (estRevele == false) {
Image im = this.pc.getImageDosCarte(RessourceLoader.DOS_PERSONNAGE);
GridPane gp = (GridPane) iv.getParent();
iv.setImage(im);
iv.fitHeightProperty().bind(gp.heightProperty());
iv.fitHeightProperty().bind(gp.heightProperty());
}
});
}
public ImageView getCartePersonnage() { public ImageView getCartePersonnage() {
Pane p = (Pane) zoneJoueur.getChildren().get(2); Pane p = (Pane) zoneJoueur.getChildren().get(2);
return (ImageView) p.getChildren().get(0); return (ImageView) p.getChildren().get(0);
} }
public void initButtonEffect(Button btn) {
btn.setOnAction(click -> {
System.out.println(this.joueur.getCartePersonnage().getNom() + bundle1.getString("va.user.de.son.pouvoir"));
threadUtiliserCapacite();
System.out.println(this.joueur.getCartePersonnage().getNom() + bundle1.getString("a.reussi.a.utiliser.son.pouvoir"));
btn.setDisable(true);
});
}
private void utiliserCapacite() {
InputStream fileSound1 = getClass().getResourceAsStream("/ihm/ressources/musique/BEEP1.wav");
EffetSonore.playSoundEffect(fileSound1);
AnchorPane save = getZoneJoueur();
joueur.utiliserCapacite();
Pane pane = null;
Platform.runLater(() -> {
Pane p = pane;
if(save != null && save.getChildren().size() > 0) {
p = (Pane) save.getChildren().get(0);
}
if(p != null) {
setZoneJoueur(p);
}});
}
private void threadUtiliserCapacite() {
Runnable task = new Runnable() {
@Override
public void run() {
utiliserCapacite();
}
};
Thread thread = new Thread(task);
thread.setDaemon(true);
thread.start();
}
public AnchorPane getZoneJoueur() { public AnchorPane getZoneJoueur() {
return (AnchorPane) zoneJoueur.getChildren().get(1); return (AnchorPane) zoneJoueur.getChildren().get(1);
} }
public void setZoneJoueur(Pane p) { public void setZoneJoueur(Pane p) {
AnchorPane ap = (AnchorPane) zoneJoueur.getChildren().get(1); AnchorPane ap = (AnchorPane) zoneJoueur.getChildren().get(1);
ap.getChildren().setAll(p); ap.getChildren().setAll(p);
@ -196,8 +77,11 @@ public class JoueurIHM {
AnchorPane.setLeftAnchor(p,0.0); AnchorPane.setLeftAnchor(p,0.0);
AnchorPane.setRightAnchor(p,0.0); AnchorPane.setRightAnchor(p,0.0);
AnchorPane.setTopAnchor(p,0.0); AnchorPane.setTopAnchor(p,0.0);
} }
public Label getLabelJoueur() { public Label getLabelJoueur() {
return (Label) zoneJoueur.getChildren().get(0); return (Label) zoneJoueur.getChildren().get(0);
} }
@ -207,6 +91,11 @@ public class JoueurIHM {
label.setText(name); label.setText(name);
} }
public Label getPaneEquipement() {
Pane p = (Pane) zoneJoueur.getChildren().get(2);
return (Label) p.getChildren().get(1);
}
public int getPosition() { public int getPosition() {
return position; return position;
} }
@ -233,51 +122,7 @@ public class JoueurIHM {
public void choisir() { public void choisir() {
}
}
public void resetZoneJoueur() {
this.getZoneJoueur().getChildren().setAll();
}
public HBox getPaneEquipement() {
ScrollPane sp = (ScrollPane) this.zoneJoueur.getChildren().get(3);
AnchorPane p = (AnchorPane) sp.getContent();
return (HBox) p.getChildren().get(0);
}
public void ajouterEquipement(CarteEquipement e) {
HBox hb = getPaneEquipement();
ImageViewEquipement ive = new ImageViewEquipement(e);
hb.getChildren().add(ive);
ive.setPreserveRatio(true);
ive.fitHeightProperty().bind(hb.heightProperty());
//ive.fitWidthProperty().bind(hb.widthProperty());
}
public void retirerEquipement(CarteEquipement e) {
HBox hb = getPaneEquipement();
List<ImageView> liv = new ArrayList<ImageView>();
for(Iterator<Node> iterator = hb.getChildren().iterator(); iterator.hasNext();) {
Node n = iterator.next();
if (n instanceof ImageViewEquipement) {
ImageViewEquipement ive = (ImageViewEquipement) n;
if (ive.contains(e)) {
liv.add(ive);
}
}
}
hb.getChildren().removeAll(liv);
}
public String getNom() {
return this.joueur.getNom();
}
} }

View File

@ -1,208 +1,57 @@
package ihm.controller; package ihm.controller;
import java.util.Random; import java.net.URL;
import java.util.ResourceBundle; import java.util.ResourceBundle;
import effet.action.Action; import javafx.fxml.FXML;
import ihm.Die; import javafx.fxml.Initializable;
import ihm.DieImages;
import javafx.animation.KeyFrame;
import javafx.animation.Timeline;
import javafx.event.ActionEvent;
import javafx.geometry.Pos;
import javafx.scene.control.Button; import javafx.scene.control.Button;
import javafx.scene.image.ImageView; import javafx.scene.control.Label;
import javafx.scene.layout.HBox;
import javafx.scene.layout.StackPane;
import javafx.scene.layout.VBox;
import javafx.scene.paint.Color;
import javafx.scene.text.Font;
import javafx.scene.text.Text;
import javafx.util.Duration;
import main.Contexte;
import main.GestionnaireJeu;
import main.Joueur;
import main.JoueurVirtuel;
public class LancerDes { public class LancerDes implements Initializable{
private int resultat; @FXML private Label d6;
private Contexte contexte; @FXML private Label d4;
private int typeDe; @FXML private Button btnStop;
private int[] rolls; @FXML private Button btnLancer;
private final static int LANCER_DE_4 = 0; private int[] valeurD6 = {1, 2, 3, 4, 5, 6};
private final static int LANCER_DE_6 = 1; private int[] valeurD4 = {1, 2, 3, 4};
private final static int LANCER_DES = 2;
public ResourceBundle bundle1 = ResourceBundle.getBundle("domaine.properties.langue", ParametreController.LaLangue); private int resultatD6;
public LancerDes(int typeDe, int[] rolls, Contexte c) { private int resultatD4;
this.typeDe = typeDe;
this.rolls = rolls; private boolean lancement = true;
this.contexte = c;
@Override
public void initialize(URL arg0, ResourceBundle arg1) {
// TODO Auto-generated method stub
btnStop.setVisible(false);
btnLancer.setOnAction(e -> {
try {
btnLancer.setVisible(false);
btnStop.setVisible(true);
lancement();
} catch (InterruptedException e1) {
e1.printStackTrace();
} }
private Button interpret(String s) {
String styles = "-fx-border-color: #e2e2e2;" + "-fx-border-width: 2;" + "-fx-background-radius: 0;"
+ "-fx-background-color: #1d1d1d;" + "-fx-text-fill: #d8d8d8;"
+ "-fx-background-insets: 0 0 0 0, 0, 1, 2;";
Button b = new Button(s);
b.setStyle(styles);
return b;
}
public VBox initLancer(Joueur joueur) {
switch (typeDe) {
case LANCER_DE_4:
return initLancerD4(joueur);
case LANCER_DE_6:
return initLancerD6(joueur);
case LANCER_DES:
return initLancerBoth(joueur);
default:
return null;
}
}
private VBox initLancerD4(Joueur j) {
DieImages images = new DieImages(4);
Die die = new Die(images.getImages());
ImageView stackpane = die.getdieFace();
stackpane.setFitHeight(100);
stackpane.setFitWidth(100);
Button btn = interpret(bundle1.getString("lancer.de.des"));
Text txt = new Text(bundle1.getString("lancer.de.des"));
txt.setFont(Font.font(null, null, null, 12));
txt.setFill(Color.WHITE);
btn.setOnAction((ActionEvent event) -> {
btn.setDisable(true);// Disable Button
Random random = new Random();
Timeline timeline = new Timeline(new KeyFrame(Duration.seconds(0.1), (actionEvent) -> {
int tempRandom = random.nextInt(4) + 1;
die.setDieFace(tempRandom);
}));
timeline.setCycleCount(20);
timeline.play();
timeline.setOnFinished(actionEvent -> {
die.setDieFace(rolls[0]);
txt.setText(bundle1.getString("vous.avez.obtenu") + " " + rolls[0]);
Timeline timeline2 = new Timeline(new KeyFrame(Duration.millis(2000), ae -> {
GestionnaireJeu.notifyPlateau();
}));
timeline2.play();
});
}); });
HBox des = new HBox(stackpane); btnStop.setOnAction(e -> {
des.setAlignment(Pos.CENTER); //à remplir avec les valeurs donné par le gestionnaire de jeux
VBox root = new VBox(txt, des, new StackPane(btn)); lancement = false;
root.setAlignment(Pos.CENTER); d6.setText(Integer.toString(resultatD6));
root.setSpacing(20); d4.setText(Integer.toString(resultatD4));
if (j instanceof JoueurVirtuel)
btn.fire();
return root;
}
private VBox initLancerD6(Joueur j) {
DieImages images = new DieImages(6);
Die die = new Die(images.getImages());
ImageView stackpane = die.getdieFace();
stackpane.setFitHeight(100);
stackpane.setFitWidth(100);
Button btn = interpret(bundle1.getString("lancer.de.des"));
Text txt = new Text(bundle1.getString("lancer.de.des"));
txt.setFont(Font.font(null, null, null, 12));
txt.setFill(Color.WHITE);
btn.setOnAction((ActionEvent event) -> {
btn.setDisable(true);// Disable Button
Random random = new Random();
Timeline timeline = new Timeline(new KeyFrame(Duration.seconds(.1), (actionEvent) -> {
int tempRandom = random.nextInt(6) + 1;
die.setDieFace(tempRandom);
}));
timeline.setCycleCount(20);
timeline.play();
timeline.setOnFinished(actionEvent -> {
die.setDieFace(rolls[0]);
txt.setText(bundle1.getString("vous.avez.obtenu") + " " + rolls[0]);
Timeline timeline2 = new Timeline(new KeyFrame(Duration.millis(2000), ae -> {
GestionnaireJeu.notifyPlateau();
}));
timeline2.play();
}); });
});
HBox des = new HBox(stackpane);
des.setAlignment(Pos.CENTER);
VBox root = new VBox(txt, des, new StackPane(btn));
root.setAlignment(Pos.CENTER);
root.setSpacing(20);
if (j instanceof JoueurVirtuel)
btn.fire();
return root;
} }
private VBox initLancerBoth(Joueur j) { public void lancement() throws InterruptedException {
DieImages images = new DieImages(6); /*int i=0;
DieImages images2 = new DieImages(4); while (lancement) {
Die die = new Die(images.getImages()); d6.setText(Integer.toString(valeurD6[i%6]));
Die die2 = new Die(images2.getImages()); d4.setText(Integer.toString(valeurD4[i%4]));
ImageView stackpane = die.getdieFace(); i++;
ImageView stackpane2 = die2.getdieFace(); //Thread.sleep(500);
stackpane.setFitHeight(100); }*/
stackpane2.setFitHeight(100);
stackpane.setFitWidth(100);
stackpane2.setFitWidth(100);
Button btn = interpret(bundle1.getString("lancer.de.des"));
Text txt = new Text(bundle1.getString("lancer.de.des"));
txt.setFont(Font.font(null, null, null, 12));
txt.setFill(Color.WHITE);
btn.setOnAction((ActionEvent event) -> {
btn.setDisable(true);// Disable Button
Random random = new Random();
Timeline timeline = new Timeline(new KeyFrame(Duration.seconds(.1), (actionEvent) -> {
int tempRandom = random.nextInt(6) + 1;
int tempRandom2 = random.nextInt(4) + 1;
die.setDieFace(tempRandom);
die2.setDieFace(tempRandom2);
}));
timeline.setCycleCount(20);
timeline.play();
timeline.setOnFinished(actionEvent -> {
die.setDieFace(rolls[1]);
die2.setDieFace(rolls[0]);
int result = rolls[0] + rolls[1];
txt.setText(bundle1.getString("vous.avez.obtenu")+ " " + result);
Timeline timeline2 = new Timeline(new KeyFrame(Duration.millis(2000), ae -> {
GestionnaireJeu.notifyPlateau();
}));
timeline2.play();
});
});
HBox des = new HBox(stackpane, stackpane2);
des.setAlignment(Pos.CENTER);
VBox root = new VBox(txt, des, new StackPane(btn));
root.setAlignment(Pos.CENTER);
root.setSpacing(20);
if (j instanceof JoueurVirtuel)
btn.fire();
return root;
}
public int getResult() {
return resultat;
} }
} }

View File

@ -1,43 +0,0 @@
package ihm.controller;
import java.net.URL;
import java.util.ResourceBundle;
import javafx.animation.KeyFrame;
import javafx.animation.Timeline;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.Button;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.util.Duration;
import main.GestionnaireJeu;
public class LieuZJ implements Initializable {
@FXML
private Button okButton;
@FXML
private ImageView imageView;
@Override
public void initialize(URL arg0, ResourceBundle arg1) {
okButton.setOnAction(x -> {
GestionnaireJeu.notifyPlateau();
});
}
public void setImageView(Image imageCarte) {
this.imageView.setImage(imageCarte);
}
public void fireBtnIA() {
okButton.setDisable(true);
Timeline timeline = new Timeline(new KeyFrame(Duration.millis(2000), ae -> {
okButton.setDisable(false);
okButton.fire();
}));
timeline.play();
}
}

View File

@ -3,6 +3,7 @@ package ihm.controller;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.net.URL; import java.net.URL;
import java.util.Locale;
import java.util.ResourceBundle; import java.util.ResourceBundle;
import ihm.EffetSonore; import ihm.EffetSonore;
@ -41,12 +42,15 @@ public class MenuController implements Initializable{
System.out.println("Passage à l'écran de choix des joueurs"); System.out.println("Passage à l'écran de choix des joueurs");
final URL fxmlURL = getClass().getResource("/ihm/ressources/Choix_joueur.fxml"); final URL fxmlURL = getClass().getResource("/ihm/ressources/Choix_joueur.fxml");
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", ParametreController.LaLangue); final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", Locale.FRANCE);
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle); final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
AnchorPane pane = fxmlLoader.load(); AnchorPane pane = fxmlLoader.load();
Scene scene = new Scene(pane); Scene scene = new Scene(pane);
Stage appStage = (Stage) ((Node) mouseEvent.getSource()).getScene().getWindow(); Stage appStage = (Stage) ((Node) mouseEvent.getSource()).getScene().getWindow();
appStage.setScene(scene); appStage.setScene(scene);
appStage.show();
} }
@FXML @FXML
@ -56,7 +60,7 @@ public class MenuController implements Initializable{
System.out.println("Passage à l'écran des paramètres"); System.out.println("Passage à l'écran des paramètres");
final URL fxmlURL = getClass().getResource("/ihm/ressources/parametre.fxml"); final URL fxmlURL = getClass().getResource("/ihm/ressources/parametre.fxml");
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", ParametreController.LaLangue); final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", Locale.FRANCE);
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle); final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
Pane pane = fxmlLoader.load(); Pane pane = fxmlLoader.load();
@ -66,10 +70,6 @@ public class MenuController implements Initializable{
} }
@FXML @FXML
public void quitterLappli(MouseEvent mouseEvent) throws IOException{ public void quitterLappli(MouseEvent mouseEvent) throws IOException{
InputStream fileSound1 = getClass().getResourceAsStream("/ihm/ressources/musique/BEEP1.wav");
EffetSonore.playSoundEffect(fileSound1);
System.exit(0); System.exit(0);
} }
@ -82,7 +82,7 @@ public class MenuController implements Initializable{
EffetSonore.playSoundEffect(fileSound1); EffetSonore.playSoundEffect(fileSound1);
System.out.println("Passage à l'écran des règles"); System.out.println("Passage à l'écran des règles");
final URL fxmlURL = getClass().getResource("/ihm/ressources/Regles.fxml"); final URL fxmlURL = getClass().getResource("/ihm/ressources/Regles.fxml");
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", ParametreController.LaLangue); final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", Locale.FRANCE);
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle); final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
AnchorPane pane = fxmlLoader.load(); AnchorPane pane = fxmlLoader.load();
Scene scene = new Scene(pane); Scene scene = new Scene(pane);

View File

@ -26,7 +26,7 @@ public class MenuJoueurController implements Initializable{
public void changeZoneToScrollPaneJoueur(MouseEvent me) throws IOException { public void changeZoneToScrollPaneJoueur(MouseEvent me) throws IOException {
final URL fxmlURL = getClass().getResource("/ihm/ressources/ScrollPaneJoueur.fxml"); final URL fxmlURL = getClass().getResource("/ihm/ressources/ScrollPaneJoueur.fxml");
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", ParametreController.LaLangue); final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", Locale.ENGLISH);
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle); final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
AnchorPane bp = fxmlLoader.load(); AnchorPane bp = fxmlLoader.load();
ImageView iv = ((ImageView)me.getSource()); ImageView iv = ((ImageView)me.getSource());

View File

@ -14,7 +14,6 @@ import javafx.fxml.FXMLLoader;
import javafx.fxml.Initializable; import javafx.fxml.Initializable;
import javafx.scene.control.CheckBox; import javafx.scene.control.CheckBox;
import javafx.scene.control.ComboBox; import javafx.scene.control.ComboBox;
import javafx.scene.control.Slider;
import javafx.scene.input.MouseEvent; import javafx.scene.input.MouseEvent;
import javafx.scene.layout.Pane; import javafx.scene.layout.Pane;
@ -25,31 +24,20 @@ public class ParametreController implements Initializable {
private CheckBox cmusique; private CheckBox cmusique;
@FXML @FXML
private CheckBox cbEffetSonore; private CheckBox cbEffetSonore;
@FXML
private CheckBox clair;
@FXML @FXML
private ComboBox<String> langues; private ComboBox<String> langues;
@FXML
private Slider sliderMusique;
@FXML
private Slider sliderEffets;
public static Locale LaLangue = Locale.FRANCE;
public static boolean cbMusiqueCoche = false; // verifi si la checbox musical est coche public static boolean cbMusiqueCoche = false; // verifi si la checbox musical est coche
public static boolean cbSonCoche = false; public static boolean cbSonCoche = false;
public static boolean cbClair = false;
public static double slideValue;
public static double slideValueEffets;
public static String langueChoisi;
private String tabLangues[] = { "Anglais", "Italien", "Espagnol", "Français" };
boolean MusiqueLancee = false; //verifi si la musique a déja été lancé une première fois boolean MusiqueLancee = false; //verifi si la musique a déja été lancé une première fois
String filepathMusique = "/ihm/ressources/musique/The_Red_Fox_Tavern.wav"; // lien vers la musique : String filepathMusique = "/ihm/ressources/musique/The_Red_Fox_Tavern.wav"; // lien vers la musique : https://www.youtube.com/watch?v=LBpKUIyOHdo
// https://www.youtube.com/watch?v=LBpKUIyOHdo
InputStream fileMusique = getClass().getResourceAsStream("/ihm/ressources/musique/The_Red_Fox_Tavern.wav"); InputStream fileMusique = getClass().getResourceAsStream("/ihm/ressources/musique/The_Red_Fox_Tavern.wav");
File repertoire = new File("src//ihm//ressources"); File repertoire = new File("src//ihm//ressources");
File repertoire2; File repertoire2;
String liste[] = repertoire.list(); String liste[] = repertoire.list();
@ -59,22 +47,14 @@ public class ParametreController implements Initializable {
cmusique.setSelected(cbMusiqueCoche); cmusique.setSelected(cbMusiqueCoche);
cbEffetSonore.setSelected(cbSonCoche); cbEffetSonore.setSelected(cbSonCoche);
clair.setSelected(cbClair);
sliderMusique.setValue(slideValue);
sliderEffets.setValue(slideValueEffets);
System.out.println("slidevalueeffet init = " + slideValueEffets);
langues.getItems().add(tabLangues[0]); langues.getItems().add("Anglais");
langues.getItems().add(tabLangues[1]); langues.getItems().add("Allemand");
langues.getItems().add(tabLangues[2]); langues.getItems().add("Espagnol");
langues.getItems().add(tabLangues[3]); langues.getItems().add("Français");
if (langueChoisi == null) {
langues.setValue("Français");
} else {
langues.setValue(langueChoisi);
}
} }
@ -83,42 +63,18 @@ public class ParametreController implements Initializable {
InputStream fileSound1 = getClass().getResourceAsStream("/ihm/ressources/musique/BEEP1.wav"); InputStream fileSound1 = getClass().getResourceAsStream("/ihm/ressources/musique/BEEP1.wav");
// Pour les langues
if (langues.getValue() == "Anglais") {
LaLangue = Locale.ENGLISH;
langueChoisi = tabLangues[0];
} else if (langues.getValue() == "Français") {
LaLangue = Locale.FRANCE;
langueChoisi = tabLangues[3];
}
else if (langues.getValue() == "Espagnol") {
LaLangue = Locale.GERMAN;
langueChoisi = tabLangues[2];
}
else if (langues.getValue() == "Italien") {
LaLangue = Locale.ITALIAN;
langueChoisi = tabLangues[1];
}
//Pour la musique //Pour la musique
if (fileMusique!=null) { if (fileMusique!=null) {
if (cmusique.isSelected() == true) { if (cmusique.isSelected() == true) {
cbMusiqueCoche = true; cbMusiqueCoche = true;
if (Musique.clipTimePosition == 0 && MusiqueLancee == false && Musique.musiqueEnCours != true) { // si la musique n'a jamais été lancé
// si la musique n'a jamais été lancé:
if (Musique.clipTimePosition == 0 && MusiqueLancee == false && Musique.musiqueEnCours != true) {
Musique.playMusique(fileMusique); Musique.playMusique(fileMusique);
Musique.musiqueEnCours = true; Musique.musiqueEnCours = true;
MusiqueLancee = true; MusiqueLancee = true;
Musique.setVolume(sliderMusique.getValue());
} } else if (Musique.musiqueEnCours != true) {
// si elle a deja été lancé mais mis en pause, reprend a partir du point d'arret : Musique.resumeMusique(Musique.clip); // si elle a deja été lancé mais mis en pause, reprend a partir du point d'arret
else if (Musique.musiqueEnCours != true) {
Musique.resumeMusique(Musique.clip);
Musique.musiqueEnCours = true;
Musique.setVolume(sliderMusique.getValue());
} }
} else { } else {
@ -149,49 +105,60 @@ public class ParametreController implements Initializable {
// Quitter les paramètres // Pour la couleur du theme
/*
if (clair.isSelected()) {
//Pane root = FXMLLoader.load(getClass().getResource("../ressources/parametre.fxml"));
//root.setStyle("ressources/style/menuLight.css");
if (liste != null) {
for (int i = 0; i < liste.length; i++) {
System.out.println(liste[i]);
System.out.println(i);
repertoire2 = new File("../ressources/" + liste[i]);
if (repertoire.isDirectory() == false) {
if (liste[i] == "Plateau.fxml") {
Pane root1 = FXMLLoader.load(getClass().getResource("../ressources/" + liste[i]));
root1.setStyle("../ressources/style/plateau.css");
}
Pane root1 = FXMLLoader.load(getClass().getResource("../ressources/" + liste[i]));
root1.setStyle("../ressources/style/menuLight.css");
}
}
}
}*/
EffetSonore.playSoundEffect(fileSound1); //emet un bruit sur le bouton si les effets sonores sont activés EffetSonore.playSoundEffect(fileSound1); //emet un bruit sur le bouton si les effets sonores sont activés
// Quitter les paramètres
final URL fxmlURL = getClass().getResource("/ihm/ressources/Menu.fxml"); final URL fxmlURL = getClass().getResource("/ihm/ressources/Menu.fxml");
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", Locale.FRANCE);
ParametreController.LaLangue);
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle); final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
Pane pane = fxmlLoader.load(); Pane pane = fxmlLoader.load();
rootPane.getChildren().setAll(pane); rootPane.getChildren().setAll(pane);
} }
@FXML @FXML
public void slideVolumeMusique(MouseEvent mouseEvent) throws IOException { public void monterVolume(MouseEvent mouseEvent) throws IOException{
Musique.volumeUp(5.f);
if (Musique.musiqueEnCours == true) { System.out.println("on monte le son");
Musique.setVolume(sliderMusique.getValue());
slideValue = sliderMusique.getValue();
}
else {
slideValue = sliderMusique.getValue();
} }
@FXML
public void baisserVolume(MouseEvent mouseEvent) throws IOException{
Musique.volumeDown(5.f);
System.out.println("on baisse le son");
} }
public void slideVolumeEffet(MouseEvent mouseEvent) throws IOException {
EffetSonore.setVolumeEffets(sliderEffets.getValue());
slideValueEffets = sliderEffets.getValue();
}
/*
*
* @FXML public void monterVolume(MouseEvent mouseEvent) throws IOException{
* Musique.volumeUp(5.f); System.out.println("on monte le son"); }
*
* @FXML public void baisserVolume(MouseEvent mouseEvent) throws IOException{
* Musique.volumeDown(5.f); System.out.println("on baisse le son"); }
*/
} }

View File

@ -4,54 +4,42 @@ import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.net.URL; import java.net.URL;
import java.util.Locale; import java.util.Locale;
import java.util.Map;
import java.util.ResourceBundle; import java.util.ResourceBundle;
import ihm.EffetSonore; import ihm.EffetSonore;
import ihm.Musique; import ihm.Musique;
import ihm.PopUp;
import javafx.fxml.FXML; import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader; import javafx.fxml.FXMLLoader;
import javafx.fxml.Initializable; import javafx.fxml.Initializable;
import javafx.scene.Node; import javafx.scene.Node;
import javafx.scene.Scene; import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.CheckBox; import javafx.scene.control.CheckBox;
import javafx.scene.control.Slider;
import javafx.scene.input.MouseEvent; import javafx.scene.input.MouseEvent;
import javafx.scene.layout.AnchorPane; import javafx.scene.layout.AnchorPane;
import javafx.stage.Stage; import javafx.stage.Stage;
import main.GestionnaireJeu; import main.GestionnaireJeu;
import main.Joueur;
public class PauseController implements Initializable { public class PauseController implements Initializable {
@FXML @FXML
private CheckBox cbMusique; private CheckBox cbMusique;
@FXML @FXML
private CheckBox cbEffet; private CheckBox cbEffet;
@FXML
private Slider sliderMusiquePause;
@FXML
private Slider sliderEffetsPause;
@FXML
private Button reglesPause;
String filepathMusique = "src//ihm//ressources//musique//The_Red_Fox_Tavern.wav"; String filepathMusique = "src//ihm//ressources//musique//The_Red_Fox_Tavern.wav";
InputStream fileMusique = getClass().getResourceAsStream("/ihm/ressources/musique/The_Red_Fox_Tavern.wav"); InputStream fileMusique = getClass().getResourceAsStream("/ihm/ressources/musique/The_Red_Fox_Tavern.wav");
boolean MusiqueLancee = ParametreController.cbMusiqueCoche; boolean MusiqueLancee = ParametreController.cbMusiqueCoche;
boolean SonLance = ParametreController.cbSonCoche; boolean SonLance = ParametreController.cbSonCoche;
public static double slideValueMusiquePause;
public static double slideValueEffetPause;
@Override @Override
public void initialize(URL arg0, ResourceBundle arg1) { public void initialize(URL arg0, ResourceBundle arg1) {
cbMusique.setSelected(ParametreController.cbMusiqueCoche); cbMusique.setSelected(ParametreController.cbMusiqueCoche);
cbEffet.setSelected(ParametreController.cbSonCoche); cbEffet.setSelected(ParametreController.cbSonCoche);
sliderMusiquePause.setValue(ParametreController.slideValue);
sliderEffetsPause.setValue(ParametreController.slideValueEffets);
slideValueMusiquePause = ParametreController.slideValue;
} }
@FXML @FXML
@ -64,19 +52,12 @@ public class PauseController implements Initializable {
if (cbMusique.isSelected()) { if (cbMusique.isSelected()) {
System.out.println("\tLancement de la musique"); System.out.println("\tLancement de la musique");
// si la musique n'a jamais été lancé if (Musique.clipTimePosition == 0 && MusiqueLancee == false && Musique.musiqueEnCours != true) { // si la musique n'a jamais été lancé
if (Musique.clipTimePosition == 0 && MusiqueLancee == false && Musique.musiqueEnCours != true) {
Musique.playMusique(fileMusique); Musique.playMusique(fileMusique);
Musique.musiqueEnCours = true; Musique.musiqueEnCours = true;
MusiqueLancee = true; MusiqueLancee = true;
Musique.setVolume(sliderMusiquePause.getValue()); } else if (MusiqueLancee ==false && Musique.musiqueEnCours != true) {
} Musique.resumeMusique(Musique.clip); // si elle a deja été lancé mais mis en pause, reprend a partir du point d'arret
// si elle a deja été lancé mais mis en pause, reprend a partir du point d'arret
else if (MusiqueLancee == false && Musique.musiqueEnCours != true) {
Musique.resumeMusique(Musique.clip);
Musique.musiqueEnCours = true;
Musique.setVolume(sliderMusiquePause.getValue());
} }
} else if (MusiqueLancee == true){ } else if (MusiqueLancee == true){
@ -101,8 +82,6 @@ public class PauseController implements Initializable {
ParametreController.cbSonCoche = cbEffet.isSelected(); ParametreController.cbSonCoche = cbEffet.isSelected();
ParametreController.cbMusiqueCoche = cbMusique.isSelected(); ParametreController.cbMusiqueCoche = cbMusique.isSelected();
ParametreController.slideValue = slideValueMusiquePause;
ParametreController.slideValueEffets = slideValueEffetPause;
EffetSonore.playSoundEffect(fileSound1); // met un bruit sur le bouton si les effets sonores sont activés EffetSonore.playSoundEffect(fileSound1); // met un bruit sur le bouton si les effets sonores sont activés
@ -117,61 +96,25 @@ public class PauseController implements Initializable {
EffetSonore.playSoundEffect(fileSound1); EffetSonore.playSoundEffect(fileSound1);
GestionnaireJeu.endGame(); GestionnaireJeu.endGame();
System.err.println("Fin de partie"); System.err.println("Fin de partie");
PlateauController platcontr = GestionnaireJeu.pc;
Stage appStage = (Stage) ((Node) me.getSource()).getScene().getWindow(); Stage appStage = (Stage) ((Node) me.getSource()).getScene().getWindow();
appStage.close(); appStage.close();
platcontr.close();
} /* final URL fxmlURL = getClass().getResource("/ihm/ressources/Menu.fxml");
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", Locale.FRENCH);
@FXML
public void slideVolumeMusique(MouseEvent mouseEvent) throws IOException {
if (Musique.musiqueEnCours == true) {
System.out.println("slide");
Musique.setVolume(sliderMusiquePause.getValue());
slideValueMusiquePause = sliderMusiquePause.getValue();
}else {
slideValueMusiquePause = sliderMusiquePause.getValue();
}
}
@FXML
public void slideVolumeEffets(MouseEvent mouseEvent) throws IOException {
System.out.println("slide effet");
EffetSonore.setVolumeEffets(sliderEffetsPause.getValue());
slideValueEffetPause = sliderEffetsPause.getValue();
}
@FXML
public void afficherReglePause(MouseEvent mouseEvent) throws IOException {
InputStream fileSound1 = getClass().getResourceAsStream("/ihm/ressources/musique/BEEP1.wav");
EffetSonore.playSoundEffect(fileSound1);
System.out.println("Passage à l'écran des règles");
final URL fxmlURL = getClass().getResource("/ihm/ressources/ReglesPause.fxml");
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", ParametreController.LaLangue);
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle); final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
AnchorPane pane = fxmlLoader.load(); AnchorPane root = fxmlLoader.load(); */
Scene scene = new Scene(pane);
Stage appStage = (Stage) ((Node) mouseEvent.getSource()).getScene().getWindow();
appStage.setScene(scene);
appStage.show();
/*
PopUp pu = new PopUp(pane, "Regles");
pu.display(); final URL fxmlURL = getClass().getResource("/ihm/ressources/Menu.fxml");
*/ final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", Locale.FRENCH);
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
AnchorPane root = fxmlLoader.load();
} }
/*
@FXML @FXML
public void monterVolume(MouseEvent mouseEvent) throws IOException{ public void monterVolume(MouseEvent mouseEvent) throws IOException{
Musique.volumeUp(5.f); Musique.volumeUp(5.f);
@ -184,7 +127,4 @@ public class PauseController implements Initializable {
System.out.println("on baisse le son"); System.out.println("on baisse le son");
} }
*/
} }

View File

@ -1,15 +1,17 @@
package ihm.controller; package ihm.controller;
import java.net.URL; import java.net.URL;
import java.util.ResourceBundle; import java.util.ResourceBundle;
import carte.CartePiochable;
import carte.CartePiochable.Type;
import javafx.fxml.FXML; import javafx.fxml.FXML;
import javafx.fxml.Initializable; import javafx.fxml.Initializable;
import javafx.scene.control.Button; import javafx.scene.control.Button;
import main.Type;
import main.TypeLumiere;
import main.TypeTenebre;
import main.TypeVision;
public class PiocherCarte implements Initializable{ public class PiocherCarte implements Initializable{
@FXML private Button lumiere; @FXML private Button lumiere;
@FXML private Button vision; @FXML private Button vision;
@ -20,15 +22,15 @@ public class PiocherCarte implements Initializable{
@Override @Override
public void initialize(URL arg0, ResourceBundle arg1) { public void initialize(URL arg0, ResourceBundle arg1) {
lumiere.setOnAction(e ->{ lumiere.setOnAction(e ->{
carte = CartePiochable.Type.LUMIERE; carte = new TypeLumiere();
}); });
vision.setOnAction(e -> { vision.setOnAction(e -> {
carte = CartePiochable.Type.VISION; carte = new TypeVision();
}); });
tenebre.setOnAction(e -> { tenebre.setOnAction(e -> {
carte = CartePiochable.Type.TENEBRE; carte = new TypeTenebre();
}); });
} }

View File

@ -22,7 +22,7 @@ public class PiocherVisionController implements Initializable{
public void voirCarte(MouseEvent mouseEvent) throws IOException{ public void voirCarte(MouseEvent mouseEvent) throws IOException{
final URL fxmlURL = getClass().getResource("/ihm/ressources/jouer_Son_Tour_donner_vision.fxml"); final URL fxmlURL = getClass().getResource("/ihm/ressources/jouer_Son_Tour_donner_vision.fxml");
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", ParametreController.LaLangue); final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", Locale.FRANCE);
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle); final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
Pane pane = fxmlLoader.load(); Pane pane = fxmlLoader.load();

View File

@ -1,7 +1,6 @@
package ihm.controller; package ihm.controller;
import java.awt.Dimension;
import java.awt.image.BufferedImage;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.net.URL; import java.net.URL;
@ -12,70 +11,40 @@ import java.util.Map;
import java.util.ResourceBundle; import java.util.ResourceBundle;
import java.util.Set; import java.util.Set;
import carte.Carte;
import carte.CarteEquipement;
import carte.CarteLieu;
import carte.CartePiochable;
import carte.CartePiochable.Type;
import database.RessourceLoader;
import effet.action.Action;
import ihm.EffetSonore; import ihm.EffetSonore;
import ihm.PopUp; import ihm.PopUp;
import javafx.animation.KeyFrame;
import javafx.animation.Timeline;
import javafx.fxml.FXML; import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader; import javafx.fxml.FXMLLoader;
import javafx.fxml.Initializable; import javafx.fxml.Initializable;
import javafx.geometry.Pos;
import javafx.scene.Group; import javafx.scene.Group;
import javafx.scene.Node;
import javafx.scene.Parent; import javafx.scene.Parent;
import javafx.scene.control.Button;
import javafx.scene.control.Label; import javafx.scene.control.Label;
import javafx.scene.control.SplitPane;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.input.MouseEvent; import javafx.scene.input.MouseEvent;
import javafx.scene.layout.AnchorPane; import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.GridPane; import javafx.scene.layout.GridPane;
import javafx.scene.layout.HBox; import javafx.scene.layout.HBox;
import javafx.scene.layout.Pane; import javafx.scene.layout.Pane;
import javafx.scene.layout.StackPane;
import javafx.scene.layout.VBox; import javafx.scene.layout.VBox;
import javafx.scene.paint.Color; import javafx.scene.paint.Color;
import javafx.util.Duration;
import main.Contexte;
import main.GestionnaireJeu; import main.GestionnaireJeu;
import main.Joueur; import main.Joueur;
import main.JoueurVirtuel;
public class PlateauController implements Initializable { public class PlateauController implements Initializable {
private List<Joueur> listJoueur = new ArrayList<Joueur>(); private List<Joueur> listJoueur = new ArrayList<Joueur>();
private List<JoueurIHM> joueursIHM; private List<JoueurIHM> joueursIHM;
@FXML @FXML private AnchorPane rootPane;
private AnchorPane rootPane; @FXML private GridPane gridPaneVie;
@FXML @FXML public GridPane gridPaneLieux;
private GridPane gridPaneVie;
@FXML
public GridPane gridPaneLieux;
private ChoisirBoolean cb; private ChoisirBoolean cb;
private ChoisirEquipement ce;
private ChoisirJoueur cj;
private PiocherCarte pc;
private LancerDes ld;
private FinDePartieControlleur fdpc;
private static Map<Carte, BufferedImage> mapRessourcesCartes; public static int DICE_SIX = 2;
private static Map<String, BufferedImage> mapRessourcesDosCartes; public static int DICE_QUATRE = 1;
public static int DICE_BOTH = 0;
public static int DICE_SIX = 1;
public static int DICE_QUATRE = 0;
public static int DICE_BOTH = 2;
private final double RES = 200. / 2250.;
private ResourceBundle resourceBundle;
/** /**
* initialise les données du plateau * initialise les données du plateau
@ -84,11 +53,8 @@ public class PlateauController implements Initializable {
public void initialize(URL arg0, ResourceBundle arg1) { public void initialize(URL arg0, ResourceBundle arg1) {
//System.out.println("Création du plateau ..."); //System.out.println("Création du plateau ...");
this.resourceBundle = arg1;
this.joueursIHM = new ArrayList<JoueurIHM>(); this.joueursIHM = new ArrayList<JoueurIHM>();
GestionnaireJeu gj = GestionnaireJeu.getGestionnaireJeu(); GestionnaireJeu gj = GestionnaireJeu.getGestionnaireJeu();
RessourceLoader rl = gj.getRessourceLoader();
Map<Integer, Joueur> map = gj.getMapJoueurs(); Map<Integer, Joueur> map = gj.getMapJoueurs();
for(int i = 0 ; i < gridPaneVie.getChildren().size();i++) { for(int i = 0 ; i < gridPaneVie.getChildren().size();i++) {
@ -101,52 +67,100 @@ public class PlateauController implements Initializable {
for(int i : map.keySet()) { for(int i : map.keySet()) {
System.out.println(i); System.out.println(i);
joueursIHM.add(new JoueurIHM(i, map.get(i), getPaneJoueur(i), joueursIHM.add(new JoueurIHM(i,map.get(i),getPaneJoueur(i),new Color(Math.random(), Math.random(), Math.random(),1),gridPaneVie, gridPaneLieux));
new Color(Math.random(), Math.random(), Math.random(), 1), gridPaneVie, gridPaneLieux, this));
} }
for(int i = 0; i<joueursIHM.size(); i++) { for(int i = 0; i<joueursIHM.size(); i++) {
joueursIHM.get(i).deplacerPionVie(0); joueursIHM.get(i).deplacerPionVie(0);
} }
mapRessourcesCartes = rl.getRessourceCartes();
setMapRessourcesDosCartes(rl.getRessourceDosCartes());
List<CarteLieu> cl = gj.getCartesLieux();
List<ImageView> ivs = this.getLieux();
applyImages(cl, ivs);
// BUTTONS ETC
//System.out.println(this.joueursPane);
/*
this.hboxJoueur.add(joueur1);
this.hboxJoueur.add(joueur2);
this.hboxJoueur.add(joueur3);
this.hboxJoueur.add(joueur4);
for (HBox hbox : hboxJoueur) {
tour.add((AnchorPane) hbox.getChildren().get(0));
VBox carte = (VBox) hbox.getChildren().get(1);
cartePerso.add((ImageView) carte.getChildren().get(0));
btnRevelation.add((Button) carte.getChildren().get(1));
VBox info = (VBox) hbox.getChildren().get(2);
nomJoueur.add((Label) info.getChildren().get(0));
}
this.vboxJoueur.add(joueur5);
this.vboxJoueur.add(joueur6);
this.vboxJoueur.add(joueur7);
this.vboxJoueur.add(joueur8);
for (VBox vbox : vboxJoueur) {
tour.add((AnchorPane) vbox.getChildren().get(0));
HBox joueur = (HBox) vbox.getChildren().get(1);
VBox carte = (VBox) joueur.getChildren().get(1);
cartePerso.add((ImageView) carte.getChildren().get(0));
btnRevelation.add((Button) carte.getChildren().get(1));
VBox info = (VBox) joueur.getChildren().get(0);
nomJoueur.add((Label) info.getChildren().get(0));
}
//initilaisation des boutons se reveler
int i = 0;
for (Button b : btnRevelation) {
int compteur = i;
b.setOnAction(e -> {try {seReveler(compteur);} catch (IOException e1) {e1.printStackTrace();}});
i++;
}
//initialisation des bouton carte personnage
int j = 0;
for (ImageView b : cartePerso) {
int compteur = j;
b.setOnMouseClicked(e -> {try {consulterSaCarte(compteur);} catch (IOException e1) {e1.printStackTrace();}});
j++;
}*/
/*
//initialisation des pions
VBox pionLieux14 = (VBox) lieux.getChildren().get(0);
VBox pionLieux58 = (VBox) lieux.getChildren().get(4);
for (int k=0; k<4; k++) {
pionLieux.add((Circle) pionLieux14.getChildren().get(k));
}
for (int k=0; k<4; k++) {
pionLieux.add((Circle) pionLieux58.getChildren().get(k));
}
VBox pionVie14 = (VBox) lieux.getChildren().get(0);
VBox pionVie58 = (VBox) lieux.getChildren().get(4);
for (int k=0; k<4; k++) {
pionVie.add((Circle) pionVie14.getChildren().get(k));
}
for (int k=0; k<4; k++) {
pionVie.add((Circle) pionVie58.getChildren().get(k));
}
System.out.println("Tour du joueur 1");
try {
final URL fxmlURL = getClass().getResource("../ressources/Jouer_tour(1)lancer_des.fxml");
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", Locale.ENGLISH);
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
Pane root = fxmlLoader.load();
root.setPrefSize(255, 180);
tour.get(2).getChildren().setAll(root);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}*/
} }
private void applyImages(List<CarteLieu> cls, List<ImageView> ivs) {
int size = cls.size();
if (cls.size() == ivs.size()) {
for (int i = 0; i < size; i++) {
CarteLieu cl = cls.get(i);
ImageView iv = ivs.get(i);
BufferedImage bi = mapRessourcesCartes.get(cl);
Image image = RessourceLoader.toJavaFX(bi);
applyImageLieu(iv, image);
}
}
}
private void applyImageLieu(ImageView iv, Image im) {
iv.setImage(im);
Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
iv.setFitWidth(RES * screenSize.width);
// iv.fitHeightProperty().bind(sp.heightProperty());
// iv.fitWidthProperty().bind(sp.widthProperty());
iv.setPreserveRatio(true);
// iv.fitWidthProperty().bind(sp.widthProperty());
}
private Pane getPaneJoueur(int i) { private Pane getPaneJoueur(int i) {
@ -179,24 +193,10 @@ public class PlateauController implements Initializable {
} }
return (Pane) gp.getChildren().get(i%2); return (Pane) gp.getChildren().get(i%2);
} }
private List<ImageView> getLieux() {
List<ImageView> views = new ArrayList<ImageView>();
for (int i = 0; i < gridPaneLieux.getChildren().size(); i++) {
HBox p = (HBox) gridPaneLieux.getChildren().get(i);
for (int j = 0; j < p.getChildren().size(); j++) {
StackPane sp = (StackPane) p.getChildren().get(j);
ImageView iv = (ImageView) sp.getChildren().get(0);
views.add(iv);
}
}
return views;
}
/** /**
* Affiche aux yeux de tous la carte personnage du joueur * Affiche aux yeux de tous la carte personnage du joueur
* *
@ -205,26 +205,29 @@ public class PlateauController implements Initializable {
public void seReveler(int numJoueur) throws IOException { public void seReveler(int numJoueur) throws IOException {
System.out.println(listJoueur.get(numJoueur).getNom() + " se revele"); System.out.println(listJoueur.get(numJoueur).getNom() + " se revele");
final URL fxmlURL = getClass().getResource("/ihm/ressources/Reveler_son_identite.fxml"); final URL fxmlURL = getClass().getResource("/ihm/ressources/Reveler_son_identite.fxml");
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", ParametreController.LaLangue); final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", Locale.FRANCE);
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle); final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
Parent root = fxmlLoader.load(); Parent root = fxmlLoader.load();
RevelationController rc = fxmlLoader.getController(); RevelationController rc = fxmlLoader.getController();
rc.showInformation(listJoueur.get(numJoueur)); rc.showInformation(listJoueur.get(numJoueur));
PopUp popup = new PopUp(root, bundle.getString("consulter.sa.carte")); PopUp popup = new PopUp(root, "Consulter sa carte");
popup.display(); popup.display();
} }
public JoueurIHM getJoueurIHM(Joueur j) { public JoueurIHM getJoueurIHM(Joueur j) {
for(JoueurIHM joueurIHM : joueursIHM) { for(JoueurIHM joueurIHM : joueursIHM) {
if (joueurIHM.getJoueur().equals(j)) if(joueurIHM.getJoueur().equals(j)) return joueurIHM;
return joueurIHM;
} }
return null; return null;
} }
/** /**
* Permet de consulter sa carte perssonage en cas d'oublie * Permet de consulter sa carte perssonage en cas d'oublie
* *
@ -233,14 +236,15 @@ public class PlateauController implements Initializable {
public void consulterSaCarte(int numJoueur) throws IOException { public void consulterSaCarte(int numJoueur) throws IOException {
System.out.println(listJoueur.get(numJoueur).getNom() + " consulte sa carte"); System.out.println(listJoueur.get(numJoueur).getNom() + " consulte sa carte");
final URL fxmlURL = getClass().getResource("/ihm/ressources/afficher_carte_perso.fxml"); final URL fxmlURL = getClass().getResource("/ihm/ressources/afficher_carte_perso.fxml");
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", ParametreController.LaLangue); final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", Locale.FRANCE);
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle); final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
Parent root = fxmlLoader.load(); Parent root = fxmlLoader.load();
AfficherCarteController acc = fxmlLoader.getController(); AfficherCarteController acc = fxmlLoader.getController();
acc.showInformation(listJoueur.get(numJoueur)); acc.showInformation(listJoueur.get(numJoueur));
PopUp popup = new PopUp(root, bundle.getString("consulter.sa.carte")); PopUp popup = new PopUp(root, "Consulter sa carte");
popup.display(); popup.display();
} }
@ -257,177 +261,22 @@ public class PlateauController implements Initializable {
getPaneJoueur(i).getChildren().setAll(); getPaneJoueur(i).getChildren().setAll();
} }
} }
} }
public void rollDice(Joueur joueur, int typeDice, int[] rolls, Contexte c) { public void rollDice(Joueur joueur, int typeDice, int[] rolls) {
this.ld = new LancerDes(typeDice, rolls, c);
JoueurIHM jihm = getJoueurIHM(joueur);
jihm.setZoneJoueur(ld.initLancer(joueur));
} }
public void afficherChoisir(Joueur j, Contexte contexte) throws IOException { public void afficherChoisir(Joueur j) throws IOException {
final URL fxmlURL = getClass().getResource("/ihm/ressources/choisirBoolean.fxml"); final URL fxmlURL = getClass().getResource("/ihm/ressources/choisirBoolean.fxml");
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", ParametreController.LaLangue);
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
Pane root = (Pane) fxmlLoader.load();
this.cb = fxmlLoader.getController();
cb.setTitre(contexte);
if (j instanceof JoueurVirtuel) {
switch (contexte) {
case ACTIVER_EFFET_LIEU:
cb.fireBtnIAEffetLieu();
break;
case ATTAQUER:
cb.fireBtnIAattaquer((JoueurVirtuel) j, j.getJoueursRange());
break;
case CHOISIR_VISION:
cb.fireBtnIAVision();
;
break;
}
}
JoueurIHM jihm = getJoueurIHM(j);
jihm.setZoneJoueur(root);
}
public void afficherChoisirEquipementVole(Joueur j, List<CarteEquipement> lce) throws IOException {
final URL fxmlURL = getClass().getResource("/ihm/ressources/Jouer_tour(2a)voler_equipement.fxml");
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", ParametreController.LaLangue);
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
Pane root = (Pane) fxmlLoader.load();
this.ce = fxmlLoader.getController();
this.ce.setListCarteEquipements(lce);
this.ce.initChoisirEquipement();
if (j instanceof JoueurVirtuel)
this.ce.fireBtnIA((JoueurVirtuel) j, Contexte.VOLER_EQUIP);
JoueurIHM jihm = getJoueurIHM(j);
jihm.setZoneJoueur(root);
}
public void afficherAlterationVie(Joueur j, int valeur) throws IOException, InterruptedException {
final URL fxmlURL = getClass().getResource("/ihm/ressources/AlterationVieZJ.fxml");
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", ParametreController.LaLangue);
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
Pane root = (Pane) fxmlLoader.load();
AlterationVieZJ avzj = fxmlLoader.getController();
avzj.changeLabel(valeur);
JoueurIHM jihm = getJoueurIHM(j);
Pane p = (Pane) jihm.getZoneJoueur();
Pane pane = new Pane();
if (p.getChildren() != null && p.getChildren().size() > 0) {
pane = (Pane) p.getChildren().get(0);
}
jihm.setZoneJoueur(root);
Pane pp = pane;
Timeline timeline = new Timeline(new KeyFrame(Duration.millis(1000), ae -> {
jihm.resetZoneJoueur();
jihm.setZoneJoueur(pp);
GestionnaireJeu.notifyPlateau();
}));
timeline.play();
}
public void afficherLieu(Joueur j) throws IOException {
final URL fxmlURL = getClass().getResource("/ihm/ressources/LieuZJ.fxml");
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", ParametreController.LaLangue);
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
Pane root = (Pane) fxmlLoader.load();
LieuZJ lzj = fxmlLoader.getController();
lzj.setImageView(this.getImageCarte(j.getCarteLieu()));
if (j instanceof JoueurVirtuel)
lzj.fireBtnIA();
JoueurIHM jihm = getJoueurIHM(j);
if (jihm.getPosition() == 4 || jihm.getPosition() == 5) {
SplitPane s = (SplitPane) root.getChildren().get(0);
AnchorPane a = (AnchorPane) s.getItems().get(0);
VBox v = (VBox) a.getChildren().get(0);
AnchorPane b = (AnchorPane) s.getItems().get(1);
ImageView i = (ImageView) b.getChildren().get(0);
v.setRotate(180);
i.setRotate(180);
s.setRotate(180);
}
jihm.setZoneJoueur(root);
}
public void afficherChoisirJoueur(Joueur j, List<Joueur> joueurs, Contexte contexte) throws IOException {
final URL fxmlURL = getClass().getResource("/ihm/ressources/choixJoueurAttq.fxml");
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", ParametreController.LaLangue);
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
Pane root = (Pane) fxmlLoader.load();
List<JoueurIHM> joueursIHM = toJoueursIHM(joueurs);
this.cj = fxmlLoader.getController();
cj.setTitre(contexte);
this.cj.setListJoueursIHM(joueursIHM);
this.cj.initButtons();
if (j instanceof JoueurVirtuel)
cj.fireBtnIA((JoueurVirtuel) j, contexte);
JoueurIHM jihm = getJoueurIHM(j);
jihm.setZoneJoueur(root);
}
private List<JoueurIHM> toJoueursIHM(List<Joueur> joueurs) {
List<JoueurIHM> list = new ArrayList<JoueurIHM>();
for (Joueur j : joueurs) {
list.add(getJoueurIHM(j));
}
return list;
}
public void afficherPiocher(Joueur j) throws IOException {
final URL fxmlURL = getClass().getResource("/ihm/ressources/Jouer_tour(2b)piocher_carte.fxml");
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", ParametreController.LaLangue);
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
Pane root = (Pane)fxmlLoader.load();
JoueurIHM jihm = getJoueurIHM(j);
jihm.setZoneJoueur(root);
}
public void afficherEffet(Joueur j) throws IOException {
final URL fxmlURL = getClass().getResource("/ihm/ressources/Jouer_tour(2b)piocher_carte.fxml");
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", ParametreController.LaLangue);
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
Pane root = (Pane)fxmlLoader.load();
JoueurIHM jihm = getJoueurIHM(j);
jihm.setZoneJoueur(root);
}
public void afficherFinDePartie(List<Joueur> listeJoueursGagnants /*, List<Image> listeImagesGagnant*/) throws IOException {
final URL fxmlURL = getClass().getResource("/ihm/ressources/Fin_De_Partie.fxml");
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", Locale.FRANCE); final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", Locale.FRANCE);
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle); final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
Pane root = (Pane)fxmlLoader.load(); Pane root = (Pane)fxmlLoader.load();
this.cb = fxmlLoader.getController();
FinDePartieControlleur.listeWinner = listeJoueursGagnants; JoueurIHM jihm = getJoueurIHM(j);
//FinDePartieControlleur.listeImageCarte = listeImagesGagnant; jihm.setZoneJoueur(root);
}
public CarteEquipement getChoixEquipementVole(Joueur joueur) {
JoueurIHM jihm = getJoueurIHM(joueur);
CarteEquipement result = this.ce.getResult();
this.ce = null;
jihm.getZoneJoueur().getChildren().setAll();
return result;
} }
public boolean getChoix(Joueur joueur) { public boolean getChoix(Joueur joueur) {
@ -438,22 +287,6 @@ public class PlateauController implements Initializable {
return result; return result;
} }
public Joueur getChoixJoueur(Joueur joueur) {
JoueurIHM jihm = getJoueurIHM(joueur);
JoueurIHM result = this.cj.getJoueurSelected();
this.cj = null;
jihm.getZoneJoueur().getChildren().setAll();
return result.getJoueur();
}
public Type getChoixCarte(Joueur joueur) {
JoueurIHM jihm = getJoueurIHM(joueur);
Type result = this.pc.getCarte();
this.pc = null;
jihm.getZoneJoueur().getChildren().setAll();
return result;
}
public void deplacer(Joueur currentJoueur) { public void deplacer(Joueur currentJoueur) {
JoueurIHM jIHM = getJoueurIHM(currentJoueur); JoueurIHM jIHM = getJoueurIHM(currentJoueur);
jIHM.replacerPionLieu(); jIHM.replacerPionLieu();
@ -463,6 +296,7 @@ public class PlateauController implements Initializable {
public void updateVieJoueur(Joueur joueur, int damage) { public void updateVieJoueur(Joueur joueur, int damage) {
JoueurIHM jIHM = getJoueurIHM(joueur); JoueurIHM jIHM = getJoueurIHM(joueur);
jIHM.deplacerPionVie(damage); jIHM.deplacerPionVie(damage);
} }
@FXML @FXML
@ -473,173 +307,11 @@ public class PlateauController implements Initializable {
System.out.println("Jeu en pause ..."); System.out.println("Jeu en pause ...");
final URL fxmlURL = getClass().getResource("/ihm/ressources/Pause.fxml"); final URL fxmlURL = getClass().getResource("/ihm/ressources/Pause.fxml");
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", ParametreController.LaLangue); final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", Locale.FRANCE);
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle); final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
Pane root = (Pane)fxmlLoader.load(); Pane root = (Pane)fxmlLoader.load();
PopUp pu = new PopUp(root, bundle.getString("cacher.carte.vision")); PopUp pu = new PopUp(root, "Pause");
pu.display(); pu.display();
} }
public static Image getImageCarte(Carte carte) {
BufferedImage bi = mapRessourcesCartes.get(carte);
return RessourceLoader.toJavaFX(bi);
}
public static Image getImageDosCarte(String s) {
BufferedImage bi = mapRessourcesDosCartes.get(s);
return RessourceLoader.toJavaFX(bi);
}
public void ajouterEquipement(Joueur j, CarteEquipement e) {
JoueurIHM jihm = getJoueurIHM(j);
jihm.ajouterEquipement(e);
}
public void retirerEquipement(Joueur j, CarteEquipement e) {
JoueurIHM jihm = getJoueurIHM(j);
jihm.retirerEquipement(e);
}
public void close() throws IOException {
final URL fxmlURL = PlateauController.class.getResource("/ihm/ressources/Menu.fxml");
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", ParametreController.LaLangue);
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
Pane pane = fxmlLoader.load();
rootPane.getChildren().setAll(pane);
}
public void afficherLT(Joueur j, CartePiochable cartePiochable) throws IOException {
Image i = getImageCarte(cartePiochable);
ImageView iv = new ImageView(i);
Pane p = new Pane(iv);
PopUp pu = new PopUp(p, "Image");
pu.getStage().focusedProperty().addListener((obs, wasFocused, isNowFocused) -> {
if (!isNowFocused) {
GestionnaireJeu.notifyPlateau();
pu.getStage().hide();
}
});
if (j instanceof JoueurVirtuel) {
Timeline timeline = new Timeline(new KeyFrame(Duration.millis(3000), ae -> {
pu.getStage().hide();
}));
timeline.play();
}
pu.display();
}
public void afficherVision(Joueur j, CartePiochable cartePiochable) throws IOException {
final URL fxmlURL = getClass().getResource("/ihm/ressources/RecevoirCarte.fxml");
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", ParametreController.LaLangue);
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
Pane root = (Pane) fxmlLoader.load();
RecevoirCarte lzj = fxmlLoader.getController();
Image im = getImageCarte(cartePiochable);
lzj.setImageView(im);
lzj.setText(bundle.getString("cacher.carte.vision"));
if (j instanceof JoueurVirtuel)
lzj.fireBtnIA();
JoueurIHM jihm = getJoueurIHM(j);
if(jihm.getPosition()==4 || jihm.getPosition()==5) {
SplitPane s=(SplitPane)root.getChildren().get(0);
AnchorPane a=(AnchorPane)s.getItems().get(0);
VBox v= (VBox)a.getChildren().get(0);
AnchorPane b=(AnchorPane)s.getItems().get(1);
ImageView i= (ImageView)b.getChildren().get(0);
v.setRotate(180);
i.setRotate(180);
s.setRotate(180);
}
jihm.getZoneJoueur();
jihm.setZoneJoueur(root);
}
public Map<String, BufferedImage> getMapRessourcesDosCartes() {
return mapRessourcesDosCartes;
}
public void setMapRessourcesDosCartes(Map<String, BufferedImage> mapRessourcesDosCartes) {
this.mapRessourcesDosCartes = mapRessourcesDosCartes;
}
private Action choixAction;
public void afficherChoisirAction(Joueur joueur, List<Action> list) {
List<Button> buttons = new ArrayList<Button>();
for (Action a : list) {
Button button = interpret(a);
buttons.add(button);
button.setOnAction(x -> {
this.choixAction = a;
GestionnaireJeu.notifyPlateau();
});
}
VBox v = new VBox();
v.getChildren().addAll(buttons);
v.setAlignment(Pos.CENTER);
v.setSpacing(20.0);
JoueurIHM jihm = getJoueurIHM(joueur);
jihm.setZoneJoueur(v);
if (joueur instanceof JoueurVirtuel) {
for (Button b : buttons)
b.setDisable(true);
Timeline timeline = new Timeline(new KeyFrame(Duration.millis(2000), ae -> {
Button bchoisi = ((JoueurVirtuel)joueur).choisirEffet(buttons);
bchoisi.setDisable(false);
bchoisi.fire();
}));
timeline.play();
}
}
public Action getChoixAction(Joueur joueur) {
return this.choixAction;
}
private Button interpret(Action a) {
String styles = "-fx-border-color: #e2e2e2;" + "-fx-border-width: 2;" + "-fx-background-radius: 0;"
+ "-fx-background-color: #1d1d1d;" + "-fx-text-fill: #d8d8d8;"
+ "-fx-background-insets: 0 0 0 0, 0, 1, 2;";
String s = a.toString();
Button b = new Button(s);
b.setStyle(styles);
return b;
}
public void revealJoueur(Joueur joueur) {
JoueurIHM jihm = getJoueurIHM(joueur);
jihm.reveler();
}
public void utiliserCapacite(Joueur joueur) {
JoueurIHM jihm = getJoueurIHM(joueur);
jihm.getRevealButton().fire();
}
public void afficherVictoire(List<Joueur> gagnants) throws IOException {
final URL fxmlURL = PlateauController.class.getResource("/ihm/ressources/Fin_De_Partie.fxml");
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", ParametreController.LaLangue);
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
Pane pane = fxmlLoader.load();
this.fdpc = fxmlLoader.getController();
fdpc.setListeWinner(gagnants);
rootPane.getChildren().setAll(pane);
}
} }

View File

@ -40,7 +40,7 @@ public class PlateauControllerTest implements Initializable {
Pane p; Pane p;
try { try {
final URL fxmlURL = getClass().getResource("/ihm/ressources/MenuJoueur.fxml"); final URL fxmlURL = getClass().getResource("/ihm/ressources/MenuJoueur.fxml");
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", ParametreController.LaLangue); final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", Locale.ENGLISH);
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle); final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
p = fxmlLoader.load(); p = fxmlLoader.load();
@ -165,12 +165,12 @@ public class PlateauControllerTest implements Initializable {
public boolean choisir(Joueur j) throws IOException { public boolean choisir(Joueur j) throws IOException {
final URL fxmlURL = getClass().getResource("/ihm/ressources/choisirBoolean.fxml"); final URL fxmlURL = getClass().getResource("/ihm/ressources/choisirBoolean.fxml");
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", ParametreController.LaLangue); final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", Locale.ENGLISH);
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle); final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
Parent root = fxmlLoader.load(); Parent root = fxmlLoader.load();
PopUpBoolean popup = new PopUpBoolean(root, bundle.getString("consulter.sa.carte")); PopUpBoolean popup = new PopUpBoolean(root, "Consulter sa carte");
return popup.display(); return popup.display();

View File

@ -6,6 +6,7 @@ import java.net.URL;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Locale;
import java.util.Map; import java.util.Map;
import java.util.ResourceBundle; import java.util.ResourceBundle;
@ -18,9 +19,7 @@ import javafx.scene.Node;
import javafx.scene.Scene; import javafx.scene.Scene;
import javafx.scene.control.Button; import javafx.scene.control.Button;
import javafx.scene.control.CheckBox; import javafx.scene.control.CheckBox;
import javafx.scene.control.RadioButton;
import javafx.scene.control.TextField; import javafx.scene.control.TextField;
import javafx.scene.control.ToggleGroup;
import javafx.scene.input.MouseEvent; import javafx.scene.input.MouseEvent;
import javafx.scene.layout.AnchorPane; import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.HBox; import javafx.scene.layout.HBox;
@ -44,48 +43,18 @@ public class PlayersController implements Initializable{
@FXML private HBox hb7; @FXML private HBox hb7;
@FXML private HBox hb8; @FXML private HBox hb8;
//pour les radios boutons
@FXML private HBox hbr1;
@FXML private HBox hbr2;
@FXML private HBox hbr3;
@FXML private HBox hbr4;
@FXML private HBox hbr5;
@FXML private HBox hbr6;
@FXML private HBox hbr7;
@FXML private HBox hbr8;
@FXML private ToggleGroup tg1;
@FXML private ToggleGroup tg2;
@FXML private ToggleGroup tg3;
@FXML private ToggleGroup tg4;
@FXML private ToggleGroup tg5;
@FXML private ToggleGroup tg6;
@FXML private ToggleGroup tg7;
@FXML private ToggleGroup tg8;
private List<HBox> ligne = new ArrayList<HBox>(); private List<HBox> ligne = new ArrayList<HBox>();
private List<Button> plus = new ArrayList<Button>(); private List<Button> plus = new ArrayList<Button>();
private List<TextField> txt = new ArrayList<TextField>(); private List<TextField> txt = new ArrayList<TextField>();
private List<CheckBox> ia = new ArrayList<CheckBox>(); private List<CheckBox> ia = new ArrayList<CheckBox>();
private List<HBox> listeHbIA = new ArrayList<HBox>();
private List<RadioButton> listeIaLv1 = new ArrayList<RadioButton>();
private List<RadioButton> listeIaLv2 = new ArrayList<RadioButton>();
private List<RadioButton> listeIaLv3 = new ArrayList<RadioButton>();
private List<ToggleGroup> listeToggleRbIa = new ArrayList<ToggleGroup>();
private HashMap<Integer, Couple> joueurs = new HashMap<Integer, Couple>(); private HashMap<Integer, Couple> joueurs = new HashMap<Integer, Couple>();
private ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", ParametreController.LaLangue);
private int nbJoueursH = 0; private int nbJoueursH = 0;
private int nbJoueursV = 0; private int nbJoueursV = 0;
/** /**
* recupère chaque bouton textField et Checkebox à partir des hbox * recup<EFBFBD>re chaque bouton textField et Checkebox a partir des hbox
*/ */
@Override @Override
public void initialize(URL arg0, ResourceBundle arg1) { public void initialize(URL arg0, ResourceBundle arg1) {
@ -97,44 +66,12 @@ public class PlayersController implements Initializable{
ligne.add(hb6); ligne.add(hb6);
ligne.add(hb7); ligne.add(hb7);
ligne.add(hb8); ligne.add(hb8);
listeHbIA.add(hbr1);
listeHbIA.add(hbr2);
listeHbIA.add(hbr3);
listeHbIA.add(hbr4);
listeHbIA.add(hbr5);
listeHbIA.add(hbr6);
listeHbIA.add(hbr7);
listeHbIA.add(hbr8);
listeToggleRbIa.add(tg1);
listeToggleRbIa.add(tg2);
listeToggleRbIa.add(tg3);
listeToggleRbIa.add(tg4);
listeToggleRbIa.add(tg5);
listeToggleRbIa.add(tg6);
listeToggleRbIa.add(tg7);
listeToggleRbIa.add(tg8);
for (HBox hb : ligne) { for (HBox hb : ligne) {
txt.add((TextField) hb.getChildren().get(0)); txt.add((TextField) hb.getChildren().get(0));
plus.add((Button) hb.getChildren().get(1)); plus.add((Button) hb.getChildren().get(1));
ia.add((CheckBox) hb.getChildren().get(2)); ia.add((CheckBox) hb.getChildren().get(2));
} }
for (HBox hbr : listeHbIA) {
listeIaLv1.add((RadioButton) hbr.getChildren().get(0));
listeIaLv2.add((RadioButton) hbr.getChildren().get(1));
listeIaLv3.add((RadioButton) hbr.getChildren().get(2));
hbr.getChildren().get(0).setVisible(false);
hbr.getChildren().get(1).setVisible(false);
hbr.getChildren().get(2).setVisible(false);
}
int i=0; int i=0;
for (Button btn : plus) { for (Button btn : plus) {
int compteur = i; int compteur = i;
@ -146,7 +83,6 @@ public class PlayersController implements Initializable{
for (TextField tf : txt) { for (TextField tf : txt) {
tf.setEditable(false); tf.setEditable(false);
tf.setStyle("-fx-background-color: silver;"); tf.setStyle("-fx-background-color: silver;");
} }
int j=0; int j=0;
@ -163,9 +99,6 @@ public class PlayersController implements Initializable{
@FXML @FXML
public void commencerJeux(MouseEvent mouseEvent) throws IOException{ public void commencerJeux(MouseEvent mouseEvent) throws IOException{
if (nbJoueursH + nbJoueursV >= 4) { if (nbJoueursH + nbJoueursV >= 4) {
if(textVide()==false && memeNom()==false) {
//ajout des joueurs finalement selectionner //ajout des joueurs finalement selectionner
int i = 0; int i = 0;
for (HBox hb : ligne) { for (HBox hb : ligne) {
@ -173,10 +106,10 @@ public class PlayersController implements Initializable{
CheckBox cb = (CheckBox) hb.getChildren().get(2); CheckBox cb = (CheckBox) hb.getChildren().get(2);
if (tf.isEditable()) { if (tf.isEditable()) {
if(cb.isSelected()) { if(cb.isSelected()) {
joueurs.put(i, new Couple(tf.getText(), choixDifficulte(listeToggleRbIa.get(i)))); joueurs.put(i, new Couple(tf.getText(), true));
} }
else { else {
joueurs.put(i, new Couple(tf.getText())); joueurs.put(i, new Couple(tf.getText(), false));
} }
} }
i++; i++;
@ -192,7 +125,7 @@ public class PlayersController implements Initializable{
gj.setConfiguration(new Configuration(this.joueurs)); gj.setConfiguration(new Configuration(this.joueurs));
final URL fxmlURL = getClass().getResource("/ihm/ressources/PlateauTest2.fxml"); final URL fxmlURL = getClass().getResource("/ihm/ressources/PlateauTest2.fxml");
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", ParametreController.LaLangue); final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", Locale.FRENCH);
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle); final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
AnchorPane root = fxmlLoader.load(); AnchorPane root = fxmlLoader.load();
PlateauController pc = fxmlLoader.getController(); PlateauController pc = fxmlLoader.getController();
@ -208,17 +141,13 @@ public class PlayersController implements Initializable{
appStage.setScene(scene); appStage.setScene(scene);
appStage.show(); appStage.show();
gj.lancerPartie(); gj.lancerPartie();
}
else {
System.out.println("On ne peut pas prendre un nom vide ou prendre le même nom qu'un autre joueur");
} }
}
else { else {
InputStream fileSound2 = getClass().getResourceAsStream("/ihm/ressources/musique/BeepError.wav"); InputStream fileSound2 = getClass().getResourceAsStream("/ihm/ressources/musique/BeepError.wav");
EffetSonore.playSoundEffect(fileSound2); EffetSonore.playSoundEffect(fileSound2);
System.out.println(bundle.getString("manque.joueur")); System.out.println("Il manque des joueurs pour lancer une partie.");
} }
} }
@ -230,7 +159,7 @@ public class PlayersController implements Initializable{
* @param indice : pour savoir quel bouton a <EFBFBD>t<EFBFBD> cliqu<EFBFBD> * @param indice : pour savoir quel bouton a <EFBFBD>t<EFBFBD> cliqu<EFBFBD>
*/ */
public void ajoutJoueur(int indice){ public void ajoutJoueur(int indice){
System.out.println(bundle.getString("ajout.joueur") + (indice+1)); System.out.println("Ajout du joueur " + (indice+1));
InputStream fileSound3 = getClass().getResourceAsStream("/ihm/ressources/musique/Beep2.wav"); InputStream fileSound3 = getClass().getResourceAsStream("/ihm/ressources/musique/Beep2.wav");
EffetSonore.playSoundEffect(fileSound3); EffetSonore.playSoundEffect(fileSound3);
@ -241,20 +170,12 @@ public class PlayersController implements Initializable{
plus.get(indice).setOnAction(e -> {enleverJoueur(indice);}); plus.get(indice).setOnAction(e -> {enleverJoueur(indice);});
if (ia.get(indice).isSelected()) { if (ia.get(indice).isSelected()) {
listeIaLv1.get(indice).setVisible(true);
listeIaLv2.get(indice).setVisible(true);
listeIaLv3.get(indice).setVisible(true);
plus.get(indice).setDisable(true);
nbJoueursV++; nbJoueursV++;
}else { }else {
ia.get(indice).setVisible(false);
nbJoueursH++; nbJoueursH++;
} }
if (nbJoueursH + nbJoueursV >= 4 && memeNom()==false && textVide()==false) { if (nbJoueursH + nbJoueursV >= 4) {
btnCommencer.setStyle("-fx-background-color: #1d1d1d; -fx-text-fill: #d8d8d8;"); btnCommencer.setStyle("-fx-background-color: #1d1d1d; -fx-text-fill: #d8d8d8;");
} }
} }
@ -265,7 +186,7 @@ public class PlayersController implements Initializable{
* @param indice : pour savoir quel bouton a <EFBFBD>t<EFBFBD> cliqu<EFBFBD> * @param indice : pour savoir quel bouton a <EFBFBD>t<EFBFBD> cliqu<EFBFBD>
*/ */
public void enleverJoueur(int indice) { public void enleverJoueur(int indice) {
System.out.println(bundle.getString("desistement") + (indice+1)); System.out.println("Desistement du joueur " + (indice+1));
InputStream fileSound3 = getClass().getResourceAsStream("/ihm/ressources/musique/Beep2.wav"); InputStream fileSound3 = getClass().getResourceAsStream("/ihm/ressources/musique/Beep2.wav");
EffetSonore.playSoundEffect(fileSound3); EffetSonore.playSoundEffect(fileSound3);
@ -276,111 +197,27 @@ public class PlayersController implements Initializable{
txt.get(indice).setStyle("-fx-background-color: silver;"); txt.get(indice).setStyle("-fx-background-color: silver;");
plus.get(indice).setOnAction(e -> {ajoutJoueur(indice);}); plus.get(indice).setOnAction(e -> {ajoutJoueur(indice);});
if (ia.get(indice).isSelected()) { if (ia.get(indice).isSelected())
nbJoueursV--; nbJoueursV--;
} else
else {
nbJoueursH--; nbJoueursH--;
}
ia.get(indice).setVisible(true);
plus.get(indice).setDisable(false);
listeIaLv1.get(indice).setVisible(false);
listeIaLv2.get(indice).setVisible(false);
listeIaLv3.get(indice).setVisible(false);
if (nbJoueursH + nbJoueursV < 4) { if (nbJoueursH + nbJoueursV < 4) {
btnCommencer.setStyle("-fx-background-color: gray; -fx-text-fill: black;"); btnCommencer.setStyle("-fx-background-color: gray; -fx-text-fill: black;");
} }
} }
public int choixDifficulte(ToggleGroup tog) {
if(tog.getSelectedToggle() == tog.getToggles().get(0)) {
System.out.println(bundle.getString("ia.facile"));
return 1;
}
else if (tog.getSelectedToggle() == tog.getToggles().get(1)) {
System.out.println(bundle.getString("ia.moyenne"));
return 2;
}
else if (tog.getSelectedToggle() == tog.getToggles().get(2)) {
System.out.println(bundle.getString("ia.difficile"));
return 3;
}
else {
System.out.println(bundle.getString("erreur.difficulte"));
return -1;
}
}
public void mettreNomDefaut(int indice) { public void mettreNomDefaut(int indice) {
if (ia.get(indice).isSelected()) { if (ia.get(indice).isSelected()) {
txt.get(indice).setText("Joueur" + indice);
ajoutJoueur(indice); ajoutJoueur(indice);
txt.get(indice).setText("Joueur" + indice);
}else }else
enleverJoueur(indice); enleverJoueur(indice);
} }
public boolean textVide() {
for(int i=0;i<txt.size();i++) {
if(txt.get(i).isEditable() && txt.get(i).getText().equals("") && txt.get(i).getText().isBlank()) {
return true;
}
}
return false;
}
@FXML
public void couleurBtnCommencerJeu() {
if (nbJoueursH + nbJoueursV >= 4 && memeNom()==false && textVide()==false) {
btnCommencer.setStyle("-fx-background-color: #1d1d1d; -fx-text-fill: #d8d8d8;");
}
else
{
btnCommencer.setStyle("-fx-background-color: gray; -fx-text-fill: black;");
}
}
public boolean memeNom() {
int i=0;
while(i<txt.size()) {
for(int j=0;j<txt.size();j++) {
if(txt.get(i).getText().equals(txt.get(j).getText()) && txt.get(i).isEditable() && txt.get(j).isEditable() && !(j==i)){
return true;
}
}
i++;
}
return false;
}
@FXML @FXML
public void retour(MouseEvent me) throws IOException { public void retour(MouseEvent me) throws IOException {
InputStream fileSound1 = getClass().getResourceAsStream("/ihm/ressources/musique/BEEP1.wav");
EffetSonore.playSoundEffect(fileSound1);
final URL fxmlURL = getClass().getResource("/ihm/ressources/Menu.fxml"); final URL fxmlURL = getClass().getResource("/ihm/ressources/Menu.fxml");
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", ParametreController.LaLangue); final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", Locale.FRANCE);
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle); final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
Pane pane = fxmlLoader.load(); Pane pane = fxmlLoader.load();

View File

@ -1,60 +0,0 @@
package ihm.controller;
import java.net.URL;
import java.util.ResourceBundle;
import javafx.animation.KeyFrame;
import javafx.animation.Timeline;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.Background;
import javafx.scene.layout.BackgroundImage;
import javafx.scene.layout.BackgroundPosition;
import javafx.scene.layout.BackgroundRepeat;
import javafx.scene.layout.BackgroundSize;
import javafx.util.Duration;
import main.GestionnaireJeu;
public class RecevoirCarte implements Initializable {
@FXML
private Button okButton;
@FXML
private Label label;
@FXML
private ImageView imageView;
@Override
public void initialize(URL arg0, ResourceBundle arg1) {
okButton.setOnAction(x -> {
GestionnaireJeu.notifyPlateau();
});
}
public void setText(String name) {
this.label.setText(name);
}
public void setImageView(Image imageCarte) {
AnchorPane ap = (AnchorPane) imageView.getParent();
BackgroundImage myBI = new BackgroundImage(imageCarte, BackgroundRepeat.NO_REPEAT, BackgroundRepeat.NO_REPEAT,
BackgroundPosition.DEFAULT, new BackgroundSize(BackgroundSize.AUTO, 1.0, true, true, false, false));
ap.setBackground(new Background(myBI));
}
public void fireBtnIA() {
okButton.setDisable(true);
Timeline timeline = new Timeline(new KeyFrame(Duration.millis(2000), ae -> {
okButton.setDisable(false);
okButton.fire();
}));
timeline.play();
}
}

View File

@ -3,6 +3,7 @@ package ihm.controller;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.net.URL; import java.net.URL;
import java.util.Locale;
import java.util.ResourceBundle; import java.util.ResourceBundle;
import ihm.EffetSonore; import ihm.EffetSonore;
@ -11,11 +12,11 @@ import javafx.fxml.FXMLLoader;
import javafx.fxml.Initializable; import javafx.fxml.Initializable;
import javafx.scene.Node; import javafx.scene.Node;
import javafx.scene.Scene; import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.image.Image; import javafx.scene.image.Image;
import javafx.scene.image.ImageView; import javafx.scene.image.ImageView;
import javafx.scene.input.MouseEvent; import javafx.scene.input.MouseEvent;
import javafx.scene.layout.AnchorPane; import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.Pane;
import javafx.stage.Stage; import javafx.stage.Stage;
public class ReglesControlleur implements Initializable { public class ReglesControlleur implements Initializable {
@ -24,23 +25,15 @@ public class ReglesControlleur implements Initializable {
private AnchorPane rootPane; private AnchorPane rootPane;
@FXML @FXML
private ImageView imageRegles; private ImageView imageRegles;
@FXML
private Button precedent;
@FXML
private Button suivant;
private int index = 1; private int index = 1;
private ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", ParametreController.LaLangue);
@Override @Override
public void initialize(URL arg0, ResourceBundle arg1) { public void initialize(URL arg0, ResourceBundle arg1) {
InputStream input = getClass().getResourceAsStream("/ihm/ressources/img/Regle1.PNG"); InputStream input = getClass().getResourceAsStream("/ihm/ressources/img/Regle1.PNG");
Image image = new Image(input); Image image = new Image(input);
imageRegles.setImage(image); imageRegles.setImage(image);
suivant.setVisible(true);
precedent.setVisible(false);
} }
@ -48,18 +41,14 @@ public class ReglesControlleur implements Initializable {
public void pageSuivante(MouseEvent mouseEvent) throws IOException { public void pageSuivante(MouseEvent mouseEvent) throws IOException {
if (index < 4) { if (index < 4) {
if (index == 3) {
suivant.setVisible(false);
} else {
suivant.setVisible(true);
}
precedent.setVisible(true);
index++; index++;
InputStream fileSound1 = getClass().getResourceAsStream("/ihm/ressources/musique/BEEP1.wav"); InputStream fileSound1 = getClass().getResourceAsStream("/ihm/ressources/musique/BEEP1.wav");
EffetSonore.playSoundEffect(fileSound1); EffetSonore.playSoundEffect(fileSound1);
System.out.println(bundle.getString("page.suivante")); System.out.println("Page suivante");
} else {
InputStream fileSound2 = getClass().getResourceAsStream("/ihm/ressources/musique/BeepError.wav");
EffetSonore.playSoundEffect(fileSound2);
System.out.println("C'est la dernière page!");
} }
InputStream input = getClass().getResourceAsStream("/ihm/ressources/img/Regle" + index + ".PNG"); InputStream input = getClass().getResourceAsStream("/ihm/ressources/img/Regle" + index + ".PNG");
@ -72,19 +61,14 @@ public class ReglesControlleur implements Initializable {
public void pagePrecedente(MouseEvent mouseEvent) throws IOException { public void pagePrecedente(MouseEvent mouseEvent) throws IOException {
if (index > 1) { if (index > 1) {
if (index == 2) {
precedent.setVisible(false);
} else {
precedent.setVisible(true);
}
index--; index--;
suivant.setVisible(true);
InputStream fileSound1 = getClass().getResourceAsStream("/ihm/ressources/musique/BEEP1.wav"); InputStream fileSound1 = getClass().getResourceAsStream("/ihm/ressources/musique/BEEP1.wav");
EffetSonore.playSoundEffect(fileSound1); EffetSonore.playSoundEffect(fileSound1);
System.out.println("Page précédente");
System.out.println(bundle.getString("page.precedente")); } else {
InputStream fileSound2 = getClass().getResourceAsStream("/ihm/ressources/musique/BeepError.wav");
EffetSonore.playSoundEffect(fileSound2);
System.out.println("C'est la première page!");
} }
InputStream input = getClass().getResourceAsStream("/ihm/ressources/img/Regle" + index + ".PNG"); InputStream input = getClass().getResourceAsStream("/ihm/ressources/img/Regle" + index + ".PNG");
@ -99,9 +83,9 @@ public class ReglesControlleur implements Initializable {
InputStream fileSound1 = getClass().getResourceAsStream("/ihm/ressources/musique/BEEP1.wav"); InputStream fileSound1 = getClass().getResourceAsStream("/ihm/ressources/musique/BEEP1.wav");
EffetSonore.playSoundEffect(fileSound1); EffetSonore.playSoundEffect(fileSound1);
System.out.println(bundle.getString("retour.menu")); System.out.println("Retour au Menu");
final URL fxmlURL = getClass().getResource("/ihm/ressources/Menu.fxml"); final URL fxmlURL = getClass().getResource("/ihm/ressources/Menu.fxml");
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", ParametreController.LaLangue); final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", Locale.FRANCE);
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle); final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
AnchorPane pane = fxmlLoader.load(); AnchorPane pane = fxmlLoader.load();
Scene scene = new Scene(pane); Scene scene = new Scene(pane);
@ -111,17 +95,4 @@ public class ReglesControlleur implements Initializable {
} }
@FXML
public void retourEnJeu(MouseEvent me) throws IOException {
InputStream fileSound1 = getClass().getResourceAsStream("/ihm/ressources/musique/BEEP1.wav");
EffetSonore.playSoundEffect(fileSound1);
System.out.println(bundle.getString("retour.jeu"));
Stage appStage = (Stage) ((Node) me.getSource()).getScene().getWindow();
appStage.close();
}
} }

View File

@ -29,7 +29,7 @@ public class ScrollPaneJoueurController implements Initializable{
public void changeZoneJoueurToMenuJoueur(MouseEvent me) throws IOException { public void changeZoneJoueurToMenuJoueur(MouseEvent me) throws IOException {
final URL fxmlURL = getClass().getResource("/ihm/ressources/MenuJoueur.fxml"); final URL fxmlURL = getClass().getResource("/ihm/ressources/MenuJoueur.fxml");
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", ParametreController.LaLangue); final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", Locale.FRENCH);
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle); final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
BorderPane bp = fxmlLoader.load(); BorderPane bp = fxmlLoader.load();
ImageView iv = ((ImageView)me.getSource()); ImageView iv = ((ImageView)me.getSource());

View File

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.Pane?>
<AnchorPane styleClass="background" stylesheets="@style/plateau.css" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ihm.controller.AlterationVieZJ">
<children>
<Pane prefHeight="200.0" prefWidth="200.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<children>
<Label fx:id="label" alignment="CENTER" contentDisplay="CENTER" layoutX="86.0" layoutY="92.0" styleClass="text" text="Label" />
</children>
</Pane>
</children>
</AnchorPane>

View File

@ -1,54 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.*?>
<?import javafx.scene.text.*?>
<?import javafx.scene.shape.*?>
<?import java.lang.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<Pane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="525.0" prefWidth="806.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1">
<children>
<HBox alignment="CENTER" layoutX="-1.0" layoutY="-7.0" prefHeight="533.0" prefWidth="806.0">
<children>
<Rectangle arcHeight="5.0" arcWidth="5.0" fill="#c6c6c6" height="298.0" stroke="BLACK" strokeType="INSIDE" width="188.0">
<HBox.margin>
<Insets left="50.0" />
</HBox.margin>
</Rectangle>
<VBox alignment="CENTER" prefHeight="533.0" prefWidth="753.0">
<children>
<Label text="Effet de la carte">
<font>
<Font size="18.0" />
</font>
<VBox.margin>
<Insets bottom="50.0" />
</VBox.margin>
</Label>
<HBox alignment="CENTER" prefHeight="100.0" prefWidth="338.0">
<children>
<Button mnemonicParsing="false" prefHeight="48.0" prefWidth="333.0" text="Se révéler et soigner ses blessures">
<font>
<Font size="18.0" />
</font>
</Button>
<Button layoutX="89.0" layoutY="38.0" mnemonicParsing="false" prefHeight="45.0" prefWidth="289.0" text="Ne rien faire">
<font>
<Font size="18.0" />
</font>
<HBox.margin>
<Insets left="5.0" right="10.0" />
</HBox.margin>
</Button>
</children>
<VBox.margin>
<Insets left="10.0" />
</VBox.margin>
</HBox>
</children>
</VBox>
</children>
</HBox>
</children>
</Pane>

View File

@ -1,11 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.VBox?>
<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" styleClass="background" stylesheets="@style/plateau.css" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ihm.ressources.ChoisirAction">
<children>
<VBox alignment="CENTER" layoutX="-126.0" layoutY="92.0" prefHeight="200.0" prefWidth="226.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0" />
</children>
</AnchorPane>

View File

@ -4,59 +4,36 @@
<?import javafx.scene.control.Button?> <?import javafx.scene.control.Button?>
<?import javafx.scene.control.CheckBox?> <?import javafx.scene.control.CheckBox?>
<?import javafx.scene.control.Label?> <?import javafx.scene.control.Label?>
<?import javafx.scene.control.RadioButton?>
<?import javafx.scene.control.TextField?> <?import javafx.scene.control.TextField?>
<?import javafx.scene.control.ToggleGroup?>
<?import javafx.scene.layout.AnchorPane?> <?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.BorderPane?> <?import javafx.scene.layout.BorderPane?>
<?import javafx.scene.layout.HBox?> <?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.VBox?> <?import javafx.scene.layout.VBox?>
<?import javafx.scene.text.Font?> <?import javafx.scene.text.Font?>
<AnchorPane fx:id="rootPane" stylesheets="@style/menu.css" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ihm.controller.PlayersController"> <AnchorPane fx:id="rootPane" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ihm.controller.PlayersController">
<children> <children>
<BorderPane styleClass="background" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"> <BorderPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="800.0" prefWidth="1280.0" styleClass="background" stylesheets="@style/menu.css" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<left> <left>
<VBox alignment="CENTER" prefHeight="688.0" prefWidth="240.0" BorderPane.alignment="CENTER"> <VBox alignment="CENTER" prefHeight="688.0" prefWidth="240.0" BorderPane.alignment="CENTER">
<children> <children>
<VBox alignment="CENTER" prefHeight="688.0" prefWidth="214.0" rotate="180.0" spacing="150.0"> <HBox fx:id="hb7" alignment="CENTER_RIGHT" prefHeight="67.0" prefWidth="340.0" rotate="90.0">
<children> <children>
<HBox alignment="CENTER_RIGHT" prefWidth="274.0" rotate="270.0"> <TextField prefHeight="51.0" prefWidth="149.0">
<children>
<VBox alignment="BOTTOM_CENTER" prefHeight="100.0" prefWidth="214.0">
<children>
<HBox fx:id="hbr8" alignment="CENTER" prefHeight="43.0" prefWidth="295.0">
<children>
<RadioButton mnemonicParsing="false" styleClass="titre" text="%ia.facile">
<toggleGroup>
<ToggleGroup fx:id="tg8" />
</toggleGroup>
</RadioButton>
<RadioButton mnemonicParsing="false" selected="true" styleClass="titre" text="%ia.moyenne" toggleGroup="$tg8">
<padding>
<Insets left="20.0" right="20.0" />
</padding>
</RadioButton>
<RadioButton mnemonicParsing="false" styleClass="titre" text="%ia.difficile" toggleGroup="$tg8" />
</children>
</HBox>
<HBox fx:id="hb8" alignment="CENTER" prefHeight="100.0" prefWidth="200.0">
<children>
<TextField onKeyPressed="#couleurBtnCommencerJeu" onKeyReleased="#couleurBtnCommencerJeu" prefHeight="51.0" prefWidth="149.0">
<font> <font>
<Font size="24.0" /> <Font size="24.0" />
</font> </font>
</TextField> </TextField>
<Button mnemonicParsing="false" prefHeight="55.0" prefWidth="45.0" styleClass="bouton" text="+"> <Button mnemonicParsing="false" prefHeight="55.0" prefWidth="45.0" styleClass="bouton" stylesheets="@style/menu.css" text="+">
<font> <font>
<Font size="24.0" /> <Font size="24.0" />
</font> </font>
<padding>
<Insets right="5.0" />
</padding>
<HBox.margin> <HBox.margin>
<Insets left="10.0" right="10.0" /> <Insets left="10.0" right="10.0" />
</HBox.margin> </HBox.margin>
<padding>
<Insets right="5.0" />
</padding>
</Button> </Button>
<CheckBox mnemonicParsing="false"> <CheckBox mnemonicParsing="false">
<font> <font>
@ -64,47 +41,27 @@
</font> </font>
</CheckBox> </CheckBox>
</children> </children>
<VBox.margin>
<Insets bottom="150.0" left="-100.0" />
</VBox.margin>
</HBox> </HBox>
</children> <HBox fx:id="hb8" alignment="CENTER_LEFT" rotate="90.0">
</VBox>
</children>
</HBox>
<HBox alignment="CENTER_RIGHT" layoutX="10.0" layoutY="304.0" prefHeight="100.0" prefWidth="299.0" rotate="270.0">
<children> <children>
<VBox alignment="BOTTOM_CENTER" prefHeight="100.0" prefWidth="214.0"> <TextField prefHeight="51.0" prefWidth="149.0">
<children>
<HBox fx:id="hbr7" alignment="CENTER" prefHeight="43.0" prefWidth="295.0">
<children>
<RadioButton mnemonicParsing="false" styleClass="titre" text="%ia.facile">
<toggleGroup>
<ToggleGroup fx:id="tg7" />
</toggleGroup>
</RadioButton>
<RadioButton mnemonicParsing="false" selected="true" styleClass="titre" text="%ia.moyenne" toggleGroup="$tg7">
<padding>
<Insets left="20.0" right="20.0" />
</padding>
</RadioButton>
<RadioButton mnemonicParsing="false" styleClass="titre" text="%ia.difficile" toggleGroup="$tg7" />
</children>
</HBox>
<HBox fx:id="hb7" alignment="CENTER" prefHeight="100.0" prefWidth="200.0">
<children>
<TextField onKeyPressed="#couleurBtnCommencerJeu" onKeyReleased="#couleurBtnCommencerJeu" prefHeight="51.0" prefWidth="149.0">
<font> <font>
<Font size="24.0" /> <Font size="24.0" />
</font> </font>
</TextField> </TextField>
<Button mnemonicParsing="false" prefHeight="55.0" prefWidth="45.0" styleClass="bouton" text="+"> <Button mnemonicParsing="false" prefHeight="55.0" prefWidth="45.0" styleClass="bouton" stylesheets="@style/menu.css" text="+">
<font> <font>
<Font size="24.0" /> <Font size="24.0" />
</font> </font>
<padding>
<Insets right="5.0" />
</padding>
<HBox.margin> <HBox.margin>
<Insets left="10.0" right="10.0" /> <Insets left="10.0" right="10.0" />
</HBox.margin> </HBox.margin>
<padding>
<Insets right="5.0" />
</padding>
</Button> </Button>
<CheckBox mnemonicParsing="false"> <CheckBox mnemonicParsing="false">
<font> <font>
@ -112,46 +69,52 @@
</font> </font>
</CheckBox> </CheckBox>
</children> </children>
<VBox.margin>
<Insets left="-100.0" top="200.0" />
</VBox.margin>
</HBox> </HBox>
</children> </children>
</VBox> </VBox>
</children>
</HBox>
</children>
</VBox>
</children>
</VBox>
</left> </left>
<right> <right>
<VBox alignment="CENTER" prefHeight="688.0" prefWidth="214.0" spacing="150.0" BorderPane.alignment="CENTER"> <VBox alignment="CENTER" prefHeight="688.0" prefWidth="248.0" BorderPane.alignment="CENTER">
<children> <children>
<HBox alignment="CENTER_RIGHT" prefWidth="274.0" rotate="270.0"> <HBox fx:id="hb4" alignment="CENTER_LEFT" prefHeight="100.0" prefWidth="200.0" rotate="270.0">
<children> <children>
<VBox alignment="BOTTOM_CENTER" prefHeight="100.0" prefWidth="214.0"> <TextField prefHeight="51.0" prefWidth="149.0">
<children>
<HBox fx:id="hbr4" alignment="CENTER" prefHeight="43.0" prefWidth="295.0">
<children>
<RadioButton mnemonicParsing="false" styleClass="titre" text="%ia.facile">
<toggleGroup>
<ToggleGroup fx:id="tg4" />
</toggleGroup>
</RadioButton>
<RadioButton mnemonicParsing="false" selected="true" styleClass="titre" text="%ia.moyenne" toggleGroup="$tg4">
<padding>
<Insets left="20.0" right="20.0" />
</padding>
</RadioButton>
<RadioButton mnemonicParsing="false" styleClass="titre" text="%ia.difficile" toggleGroup="$tg4" />
</children>
</HBox>
<HBox fx:id="hb4" alignment="CENTER" prefHeight="100.0" prefWidth="200.0">
<children>
<TextField onKeyPressed="#couleurBtnCommencerJeu" onKeyReleased="#couleurBtnCommencerJeu" prefHeight="51.0" prefWidth="149.0">
<font> <font>
<Font size="24.0" /> <Font size="24.0" />
</font> </font>
</TextField> </TextField>
<Button mnemonicParsing="false" prefHeight="55.0" prefWidth="45.0" styleClass="bouton" text="+"> <Button mnemonicParsing="false" prefHeight="55.0" prefWidth="45.0" styleClass="bouton" stylesheets="@style/menu.css" text="+">
<font>
<Font size="24.0" />
</font>
<HBox.margin>
<Insets left="10.0" right="10.0" />
</HBox.margin>
<padding>
<Insets right="5.0" />
</padding>
</Button>
<CheckBox mnemonicParsing="false">
<font>
<Font size="24.0" />
</font>
</CheckBox>
</children>
<VBox.margin>
<Insets bottom="150.0" right="-100.0" />
</VBox.margin>
</HBox>
<HBox fx:id="hb3" alignment="CENTER_RIGHT" prefHeight="100.0" prefWidth="200.0" rotate="270.0">
<children>
<TextField prefHeight="51.0" prefWidth="149.0">
<font>
<Font size="24.0" />
</font>
</TextField>
<Button mnemonicParsing="false" prefHeight="55.0" prefWidth="45.0" styleClass="bouton" stylesheets="@style/menu.css" text="+">
<font> <font>
<Font size="24.0" /> <Font size="24.0" />
</font> </font>
@ -168,81 +131,32 @@
</font> </font>
</CheckBox> </CheckBox>
</children> </children>
</HBox> <VBox.margin>
</children> <Insets right="-100.0" top="150.0" />
</VBox> </VBox.margin>
</children>
</HBox>
<HBox alignment="CENTER_RIGHT" layoutX="10.0" layoutY="304.0" prefHeight="100.0" prefWidth="299.0" rotate="270.0">
<children>
<VBox alignment="BOTTOM_CENTER" prefHeight="100.0" prefWidth="214.0">
<children>
<HBox fx:id="hbr3" alignment="CENTER" prefHeight="43.0" prefWidth="295.0">
<children>
<RadioButton mnemonicParsing="false" styleClass="titre" text="%ia.facile">
<toggleGroup>
<ToggleGroup fx:id="tg3" />
</toggleGroup>
</RadioButton>
<RadioButton mnemonicParsing="false" selected="true" styleClass="titre" text="%ia.moyenne" toggleGroup="$tg3">
<padding>
<Insets left="20.0" right="20.0" />
</padding>
</RadioButton>
<RadioButton mnemonicParsing="false" styleClass="titre" text="%ia.difficile" toggleGroup="$tg3" />
</children>
</HBox>
<HBox fx:id="hb3" alignment="CENTER" prefHeight="100.0" prefWidth="200.0">
<children>
<TextField onKeyPressed="#couleurBtnCommencerJeu" onKeyReleased="#couleurBtnCommencerJeu" prefHeight="51.0" prefWidth="149.0">
<font>
<Font size="24.0" />
</font>
</TextField>
<Button mnemonicParsing="false" prefHeight="55.0" prefWidth="45.0" styleClass="bouton" text="+">
<font>
<Font size="24.0" />
</font>
<padding>
<Insets right="5.0" />
</padding>
<HBox.margin>
<Insets left="10.0" right="10.0" />
</HBox.margin>
</Button>
<CheckBox mnemonicParsing="false">
<font>
<Font size="24.0" />
</font>
</CheckBox>
</children>
</HBox>
</children>
</VBox>
</children>
</HBox> </HBox>
</children> </children>
</VBox> </VBox>
</right> </right>
<center> <center>
<VBox alignment="CENTER" prefHeight="486.0" prefWidth="553.0" BorderPane.alignment="CENTER"> <VBox alignment="CENTER" prefHeight="486.0" prefWidth="392.0" BorderPane.alignment="CENTER">
<children> <children>
<Label styleClass="titre" text="%entrez.nom.joueur"> <Label styleClass="titre" stylesheets="@style/menu.css" text="%entrez.nom.joueur">
<font> <font>
<Font size="48.0" /> <Font size="48.0" />
</font> </font>
</Label> </Label>
<Label styleClass="titre" text="%nombre.joueur.minimum"> <Label styleClass="titre" stylesheets="@style/menu.css" text="%nombre.joueur.minimum">
<font> <font>
<Font size="36.0" /> <Font size="36.0" />
</font> </font>
</Label> </Label>
<Label styleClass="titre" text="%cocher.case"> <Label styleClass="titre" stylesheets="@style/menu.css" text="%cocher.case">
<font> <font>
<Font size="36.0" /> <Font size="36.0" />
</font> </font>
</Label> </Label>
<Button fx:id="btnCommencer" mnemonicParsing="false" onMouseClicked="#commencerJeux" styleClass="bouton" text="%commencer.partie"> <Button fx:id="btnCommencer" mnemonicParsing="false" onMouseClicked="#commencerJeux" styleClass="bouton" stylesheets="@style/menu.css" text="%commencer.partie">
<font> <font>
<Font size="24.0" /> <Font size="24.0" />
</font> </font>
@ -250,7 +164,7 @@
<Insets top="20.0" /> <Insets top="20.0" />
</VBox.margin> </VBox.margin>
</Button> </Button>
<Button layoutX="283.0" layoutY="379.0" mnemonicParsing="false" onMouseClicked="#retour" prefHeight="55.0" prefWidth="247.0" styleClass="bouton" text="%retour"> <Button layoutX="283.0" layoutY="379.0" mnemonicParsing="false" onMouseClicked="#retour" prefHeight="55.0" prefWidth="247.0" styleClass="bouton" stylesheets="@style/menu.css" text="retour">
<font> <font>
<Font size="24.0" /> <Font size="24.0" />
</font> </font>
@ -264,16 +178,14 @@
<top> <top>
<HBox alignment="CENTER" prefHeight="110.0" prefWidth="1280.0" BorderPane.alignment="CENTER"> <HBox alignment="CENTER" prefHeight="110.0" prefWidth="1280.0" BorderPane.alignment="CENTER">
<children> <children>
<VBox alignment="CENTER" prefHeight="110.0" prefWidth="559.0" spacing="10.0"> <HBox fx:id="hb6" alignment="CENTER" rotate="180.0">
<children> <children>
<HBox fx:id="hb6" alignment="CENTER" prefWidth="754.0" rotate="180.0"> <TextField>
<children>
<TextField onKeyPressed="#couleurBtnCommencerJeu" onKeyReleased="#couleurBtnCommencerJeu">
<font> <font>
<Font size="24.0" /> <Font size="24.0" />
</font> </font>
</TextField> </TextField>
<Button mnemonicParsing="false" prefHeight="55.0" prefWidth="55.0" styleClass="bouton" text="+"> <Button mnemonicParsing="false" prefHeight="55.0" prefWidth="55.0" styleClass="bouton" stylesheets="@style/menu.css" text="+">
<font> <font>
<Font size="24.0" /> <Font size="24.0" />
</font> </font>
@ -288,26 +200,9 @@
</CheckBox> </CheckBox>
</children> </children>
</HBox> </HBox>
<HBox fx:id="hbr6" alignment="CENTER" prefHeight="20.0" prefWidth="762.0"> <HBox fx:id="hb5" alignment="CENTER" rotate="180.0">
<children> <children>
<RadioButton contentDisplay="CENTER" mnemonicParsing="false" rotate="180.0" styleClass="titre" text="%ia.difficile"> <TextField accessibleRole="PARENT">
<toggleGroup>
<ToggleGroup fx:id="tg6" />
</toggleGroup></RadioButton>
<RadioButton mnemonicParsing="false" rotate="180.0" selected="true" styleClass="titre" text="%ia.moyenne" toggleGroup="$tg6">
<padding>
<Insets left="20.0" right="20.0" />
</padding></RadioButton>
<RadioButton mnemonicParsing="false" rotate="180.0" styleClass="titre" text="%ia.facile" toggleGroup="$tg6" />
</children>
</HBox>
</children>
</VBox>
<VBox alignment="CENTER" spacing="10.0">
<children>
<HBox fx:id="hb5" alignment="CENTER" prefHeight="55.0" prefWidth="537.0" rotate="180.0">
<children>
<TextField accessibleRole="PARENT" onKeyPressed="#couleurBtnCommencerJeu" onKeyReleased="#couleurBtnCommencerJeu">
<font> <font>
<Font size="24.0" /> <Font size="24.0" />
</font> </font>
@ -315,7 +210,7 @@
<Insets /> <Insets />
</HBox.margin> </HBox.margin>
</TextField> </TextField>
<Button mnemonicParsing="false" prefHeight="55.0" prefWidth="55.0" styleClass="bouton" text="+"> <Button mnemonicParsing="false" prefHeight="55.0" prefWidth="55.0" styleClass="bouton" stylesheets="@style/menu.css" text="+">
<font> <font>
<Font size="24.0" /> <Font size="24.0" />
</font> </font>
@ -329,59 +224,26 @@
</font> </font>
</CheckBox> </CheckBox>
</children> </children>
<HBox.margin>
<Insets left="30.0" />
</HBox.margin>
</HBox> </HBox>
<HBox fx:id="hbr5" alignment="CENTER" prefHeight="6.0" prefWidth="356.0">
<children>
<RadioButton mnemonicParsing="false" rotate="180.0" styleClass="titre" text="%ia.difficile">
<toggleGroup>
<ToggleGroup fx:id="tg5" />
</toggleGroup></RadioButton>
<RadioButton mnemonicParsing="false" rotate="180.0" selected="true" styleClass="titre" text="Moyen" toggleGroup="$tg5">
<padding>
<Insets left="20.0" right="20.0" />
</padding></RadioButton>
<RadioButton mnemonicParsing="false" rotate="180.0" styleClass="titre" text="%ia.facile" toggleGroup="$tg5" />
</children>
</HBox>
</children>
</VBox>
</children> </children>
</HBox> </HBox>
</top> </top>
<bottom> <bottom>
<VBox alignment="CENTER" prefHeight="0.0" prefWidth="902.0" BorderPane.alignment="CENTER"> <VBox alignment="CENTER" prefHeight="94.0" prefWidth="1280.0" BorderPane.alignment="CENTER">
<children> <children>
<HBox alignment="CENTER" prefHeight="129.0" prefWidth="1280.0"> <HBox alignment="CENTER" prefHeight="100.0" prefWidth="200.0">
<children> <children>
<VBox alignment="CENTER" prefHeight="70.0" prefWidth="1338.0" spacing="20.0">
<children>
<HBox fx:id="hbr1" alignment="CENTER" prefHeight="43.0" prefWidth="688.0">
<children>
<RadioButton mnemonicParsing="false" styleClass="titre" text="%ia.facile">
<opaqueInsets>
<Insets />
</opaqueInsets>
<toggleGroup>
<ToggleGroup fx:id="tg1" />
</toggleGroup></RadioButton>
<RadioButton mnemonicParsing="false" selected="true" styleClass="titre" text="%ia.moyenne" toggleGroup="$tg1">
<padding>
<Insets left="20.0" right="20.0" />
</padding></RadioButton>
<RadioButton mnemonicParsing="false" styleClass="titre" text="%ia.difficile" toggleGroup="$tg1" />
</children>
<padding>
<Insets bottom="-5.0" />
</padding>
</HBox>
<HBox fx:id="hb1" alignment="CENTER"> <HBox fx:id="hb1" alignment="CENTER">
<children> <children>
<TextField onKeyPressed="#couleurBtnCommencerJeu" onKeyReleased="#couleurBtnCommencerJeu" prefHeight="51.0" prefWidth="298.0"> <TextField prefHeight="51.0" prefWidth="298.0">
<font> <font>
<Font size="24.0" /> <Font size="24.0" />
</font> </font>
</TextField> </TextField>
<Button mnemonicParsing="false" prefHeight="55.0" prefWidth="55.0" styleClass="bouton" text="+"> <Button mnemonicParsing="false" prefHeight="55.0" prefWidth="55.0" styleClass="bouton" stylesheets="@style/menu.css" text="+">
<font> <font>
<Font size="24.0" /> <Font size="24.0" />
</font> </font>
@ -395,43 +257,15 @@
</font> </font>
</CheckBox> </CheckBox>
</children> </children>
<padding>
<Insets bottom="10.0" top="-3.0" />
</padding>
</HBox> </HBox>
</children> <HBox fx:id="hb2" alignment="CENTER">
<opaqueInsets>
<Insets />
</opaqueInsets>
</VBox>
<VBox alignment="CENTER" prefHeight="70.0" prefWidth="1213.0">
<children> <children>
<HBox fx:id="hbr2" alignment="CENTER" prefHeight="43.0" prefWidth="688.0"> <TextField>
<children>
<RadioButton mnemonicParsing="false" styleClass="titre" text="%ia.facile">
<toggleGroup>
<ToggleGroup fx:id="tg2" />
</toggleGroup>
</RadioButton>
<RadioButton mnemonicParsing="false" selected="true" styleClass="titre" text="%ia.moyenne" toggleGroup="$tg2">
<padding>
<Insets left="20.0" right="20.0" />
</padding>
</RadioButton>
<RadioButton mnemonicParsing="false" styleClass="titre" text="%ia.difficile" toggleGroup="$tg2" />
</children>
<padding>
<Insets bottom="10.0" />
</padding>
</HBox>
<HBox fx:id="hb2" alignment="CENTER" prefHeight="63.0" prefWidth="433.0">
<children>
<TextField onKeyPressed="#couleurBtnCommencerJeu" onKeyReleased="#couleurBtnCommencerJeu" prefHeight="51.0" prefWidth="310.0">
<font> <font>
<Font size="24.0" /> <Font size="24.0" />
</font> </font>
</TextField> </TextField>
<Button mnemonicParsing="false" prefHeight="55.0" prefWidth="55.0" styleClass="bouton" text="+"> <Button mnemonicParsing="false" prefHeight="55.0" prefWidth="55.0" styleClass="bouton" stylesheets="@style/menu.css" text="+">
<font> <font>
<Font size="24.0" /> <Font size="24.0" />
</font> </font>
@ -445,18 +279,13 @@
</font> </font>
</CheckBox> </CheckBox>
</children> </children>
<padding> <HBox.margin>
<Insets bottom="10.0" /> <Insets left="30.0" />
</padding> </HBox.margin>
</HBox> </HBox>
</children> </children>
</VBox>
</children>
</HBox> </HBox>
</children> </children>
<opaqueInsets>
<Insets />
</opaqueInsets>
</VBox> </VBox>
</bottom> </bottom>
</BorderPane> </BorderPane>

View File

@ -1,42 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.layout.Pane?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.text.Font?>
<Pane fx:id="rootPane" styleClass="background" stylesheets="@style/menu.css" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ihm.controller.FinDePartieControlleur">
<children>
<VBox alignment="TOP_CENTER" prefHeight="595.0" prefWidth="758.0">
<children>
<Label alignment="CENTER" contentDisplay="CENTER" prefWidth="346.0" styleClass="titre" text="FIN DE PARTIE">
<font>
<Font size="36.0" />
</font>
<padding>
<Insets top="50.0" />
</padding>
</Label>
<Label alignment="CENTER" contentDisplay="CENTER" prefHeight="54.0" prefWidth="386.0" styleClass="titre" text="La victoire appartient à:" textAlignment="CENTER">
<font>
<Font size="36.0" />
</font>
<VBox.margin>
<Insets bottom="50.0" top="25.0" />
</VBox.margin>
</Label>
<VBox fx:id="vbListeWinner" alignment="CENTER" prefHeight="221.0" prefWidth="758.0" />
<Button mnemonicParsing="false" onMouseClicked="#retourMenu" prefHeight="47.0" prefWidth="108.0" styleClass="bouton" text="Menu">
<font>
<Font size="18.0" />
</font>
<VBox.margin>
<Insets top="50.0" />
</VBox.margin>
</Button>
</children>
</VBox>
</children>
</Pane>

View File

@ -1,99 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.Pane?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.shape.Rectangle?>
<?import javafx.scene.text.Font?>
<Pane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1">
<children>
<VBox prefHeight="400.0" prefWidth="600.0">
<children>
<HBox alignment="CENTER" prefHeight="106.0" prefWidth="600.0">
<children>
<HBox alignment="CENTER" prefHeight="100.0" prefWidth="200.0">
<children>
<Button mnemonicParsing="false" text="Joueur 1" />
</children>
</HBox>
<HBox alignment="CENTER" prefHeight="100.0" prefWidth="200.0">
<children>
<Button mnemonicParsing="false" text="Joueur 2" />
</children>
</HBox>
<HBox alignment="CENTER" prefHeight="100.0" prefWidth="200.0">
<children>
<Button mnemonicParsing="false" text="Joueur 3" />
</children>
</HBox>
<HBox alignment="CENTER" prefHeight="100.0" prefWidth="200.0">
<children>
<Button mnemonicParsing="false" text="Joueur 4" />
</children>
</HBox>
</children>
</HBox>
<HBox alignment="CENTER" prefHeight="184.0" prefWidth="600.0">
<children>
<VBox alignment="CENTER" prefHeight="178.0" prefWidth="599.0">
<children>
<Label prefHeight="27.0" prefWidth="103.0" text="Carte Vision">
<font>
<Font size="18.0" />
</font>
</Label>
<HBox alignment="CENTER" prefHeight="100.0" prefWidth="200.0">
<children>
<Rectangle arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="200.0" stroke="BLACK" strokeType="INSIDE" width="112.0" />
<HBox alignment="CENTER" prefHeight="100.0" prefWidth="200.0">
<children>
<Label prefHeight="27.0" prefWidth="138.0" text="*Effet de la carte" textAlignment="CENTER">
<font>
<Font size="18.0" />
</font>
</Label>
</children>
</HBox>
</children>
</HBox>
<Label prefHeight="27.0" prefWidth="340.0" text="Choisissez un joueur à qui donner la carte.">
<font>
<Font size="18.0" />
</font>
</Label>
</children>
</VBox>
</children>
</HBox>
<HBox alignment="CENTER" prefHeight="111.0" prefWidth="600.0">
<children>
<HBox alignment="CENTER" prefHeight="100.0" prefWidth="200.0">
<children>
<Button mnemonicParsing="false" text="Joueur 5" />
</children>
</HBox>
<HBox alignment="CENTER" prefHeight="100.0" prefWidth="200.0">
<children>
<Button mnemonicParsing="false" text="Joueur 6" />
</children>
</HBox>
<HBox alignment="CENTER" prefHeight="100.0" prefWidth="200.0">
<children>
<Button mnemonicParsing="false" text="Joueur 7" />
</children>
</HBox>
<HBox alignment="CENTER" prefHeight="100.0" prefWidth="200.0">
<children>
<Button mnemonicParsing="false" text="Joueur 8" />
</children>
</HBox>
</children>
</HBox>
</children>
</VBox>
</children>
</Pane>

View File

@ -1,51 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.Pane?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.shape.Rectangle?>
<?import javafx.scene.text.Font?>
<Pane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1">
<children>
<VBox prefHeight="400.0" prefWidth="600.0">
<children>
<HBox alignment="CENTER" prefHeight="100.0" prefWidth="200.0">
<children>
<Label prefHeight="27.0" prefWidth="54.0" text="Carte">
<font>
<Font size="18.0" />
</font>
</Label>
<Label prefHeight="27.0" prefWidth="175.0" text="*Lumiere ou Tenebre">
<font>
<Font size="18.0" />
</font>
</Label>
</children>
</HBox>
<HBox alignment="CENTER" prefHeight="190.0" prefWidth="600.0">
<children>
<Rectangle arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="198.0" stroke="BLACK" strokeType="INSIDE" width="130.0" />
</children>
</HBox>
<HBox alignment="CENTER" prefHeight="111.0" prefWidth="600.0">
<children>
<Label prefHeight="27.0" prefWidth="54.0" text="Effet :">
<font>
<Font size="18.0" />
</font>
</Label>
<Label prefHeight="27.0" prefWidth="142.0" text="*effet de la carte">
<font>
<Font size="18.0" />
</font>
</Label>
</children>
</HBox>
</children>
</VBox>
</children>
</Pane>

View File

@ -1,46 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.Pane?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.shape.Rectangle?>
<?import javafx.scene.text.Font?>
<Pane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1">
<children>
<VBox prefHeight="400.0" prefWidth="600.0">
<children>
<HBox alignment="CENTER" prefHeight="100.0" prefWidth="200.0">
<children>
<Label prefHeight="27.0" prefWidth="106.0" text="Carte Vision">
<font>
<Font size="18.0" />
</font>
</Label>
</children>
</HBox>
<HBox alignment="CENTER" prefHeight="167.0" prefWidth="600.0">
<children>
<Rectangle arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="198.0" stroke="BLACK" strokeType="INSIDE" width="130.0" />
</children>
</HBox>
<HBox alignment="CENTER" prefHeight="91.0" prefWidth="600.0">
<children>
<Label prefHeight="27.0" prefWidth="473.0" text="Cette carte ne peut être vu que par le joueur qui la pioche.">
<font>
<Font size="18.0" />
</font>
</Label>
</children>
</HBox>
<HBox alignment="CENTER" prefHeight="69.0" prefWidth="600.0">
<children>
<Button mnemonicParsing="false" text="Voir carte" />
</children>
</HBox>
</children>
</VBox>
</children>
</Pane>

View File

@ -1,36 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.Pane?>
<?import javafx.scene.text.Font?>
<Pane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1">
<children>
<HBox alignment="CENTER" layoutY="1.0" prefHeight="400.0" prefWidth="600.0">
<children>
<Label contentDisplay="CENTER" prefHeight="27.0" prefWidth="87.0" text="*Joueur x*" textAlignment="CENTER">
<font>
<Font size="18.0" />
</font>
</Label>
<Label contentDisplay="CENTER" prefHeight="27.0" prefWidth="52.0" text="reçoit" textAlignment="CENTER">
<font>
<Font size="18.0" />
</font>
</Label>
<Label contentDisplay="CENTER" prefHeight="27.0" prefWidth="31.0" text="*n*" textAlignment="CENTER">
<font>
<Font size="18.0" />
</font>
</Label>
<Label contentDisplay="CENTER" prefHeight="27.0" prefWidth="82.0" text="Blessures." textAlignment="CENTER">
<font>
<Font size="18.0" />
</font>
</Label>
</children>
</HBox>
</children>
</Pane>

View File

@ -1,20 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.Pane?>
<?import javafx.scene.text.Font?>
<Pane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1">
<children>
<HBox alignment="CENTER" layoutY="1.0" prefHeight="400.0" prefWidth="600.0">
<children>
<Label contentDisplay="CENTER" prefHeight="27.0" prefWidth="149.0" text="Il ne se passe rien." textAlignment="CENTER">
<font>
<Font size="18.0" />
</font>
</Label>
</children>
</HBox>
</children>
</Pane>

View File

@ -35,7 +35,7 @@
<Font size="48.0" /> <Font size="48.0" />
</font> </font>
</Label> </Label>
<Button fx:id="btnStop" layoutX="101.0" layoutY="140.0" mnemonicParsing="false" text="%stop"> <Button fx:id="btnStop" layoutX="101.0" layoutY="140.0" mnemonicParsing="false" text="Stop">
<font> <font>
<Font size="14.0" /> <Font size="14.0" />
</font> </font>

View File

@ -1,26 +1,54 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Label?> <?import javafx.scene.control.Label?>
<?import javafx.scene.control.ScrollPane?> <?import javafx.scene.control.ScrollPane?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.AnchorPane?> <?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.HBox?> <?import javafx.scene.layout.ColumnConstraints?>
<?import javafx.scene.layout.VBox?> <?import javafx.scene.layout.GridPane?>
<?import javafx.scene.layout.Pane?>
<?import javafx.scene.layout.RowConstraints?>
<AnchorPane stylesheets="@style/plateau.css" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ihm.controller.ChoisirEquipement"> <AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="180.0" prefWidth="255.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ihm.controller.ChoisirEquipement">
<children> <children>
<VBox alignment="CENTER" spacing="10.0" styleClass="background" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"> <Pane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="180.0" prefWidth="255.0" stylesheets="@style/popUp.css">
<children> <children>
<Label alignment="CENTER" contentDisplay="CENTER" styleClass="text" text="%voler.equipement.joueur" /> <Label layoutX="58.0" layoutY="14.0" text="%voler.equipement.joueur" />
<ScrollPane fx:id="scrollpane" fitToHeight="true" fitToWidth="true" prefHeight="144.0" prefWidth="144.0" vbarPolicy="NEVER" VBox.vgrow="SOMETIMES"> <ScrollPane layoutX="28.0" layoutY="38.0" prefHeight="128.0" prefWidth="200.0">
<content> <content>
<HBox fx:id="hbox" styleClass="background" /> <GridPane fx:id="grilleEquipement">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" />
<ColumnConstraints hgrow="SOMETIMES" />
<ColumnConstraints hgrow="SOMETIMES" />
<ColumnConstraints hgrow="SOMETIMES" />
</columnConstraints>
<rowConstraints>
<RowConstraints vgrow="SOMETIMES" />
<RowConstraints vgrow="SOMETIMES" />
<RowConstraints vgrow="SOMETIMES" />
<RowConstraints vgrow="SOMETIMES" />
<RowConstraints vgrow="SOMETIMES" />
<RowConstraints vgrow="SOMETIMES" />
</rowConstraints>
<children>
<ImageView fitHeight="60.0" fitWidth="43.0" pickOnBounds="true" preserveRatio="true" />
<ImageView fitHeight="60.0" fitWidth="43.0" pickOnBounds="true" preserveRatio="true" GridPane.columnIndex="1" />
<ImageView fitHeight="60.0" fitWidth="43.0" pickOnBounds="true" preserveRatio="true" GridPane.columnIndex="2" />
<ImageView fitHeight="60.0" fitWidth="43.0" pickOnBounds="true" preserveRatio="true" GridPane.columnIndex="3" />
<ImageView fitHeight="60.0" fitWidth="43.0" pickOnBounds="true" preserveRatio="true" GridPane.rowIndex="1" />
<ImageView fitHeight="60.0" fitWidth="43.0" pickOnBounds="true" preserveRatio="true" GridPane.columnIndex="1" GridPane.rowIndex="1" />
<ImageView fitHeight="60.0" fitWidth="43.0" pickOnBounds="true" preserveRatio="true" GridPane.columnIndex="2" GridPane.rowIndex="1" />
<ImageView fitHeight="60.0" fitWidth="43.0" pickOnBounds="true" preserveRatio="true" GridPane.columnIndex="3" GridPane.rowIndex="1" />
<ImageView fitHeight="60.0" fitWidth="43.0" pickOnBounds="true" preserveRatio="true" GridPane.rowIndex="2" />
<ImageView fitHeight="60.0" fitWidth="43.0" pickOnBounds="true" preserveRatio="true" GridPane.columnIndex="1" GridPane.rowIndex="2" />
<ImageView fitHeight="60.0" fitWidth="43.0" pickOnBounds="true" preserveRatio="true" GridPane.columnIndex="2" GridPane.rowIndex="2" />
<ImageView fitHeight="60.0" fitWidth="43.0" pickOnBounds="true" preserveRatio="true" GridPane.columnIndex="3" GridPane.rowIndex="2" />
</children>
</GridPane>
</content> </content>
</ScrollPane> </ScrollPane>
</children> </children>
<padding> </Pane>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</padding>
</VBox>
</children> </children>
</AnchorPane> </AnchorPane>

View File

@ -78,7 +78,7 @@
</Button> </Button>
</children> </children>
</HBox> </HBox>
<Label fx:id="titre" layoutX="9.0" layoutY="82.0" text="%choisir.jouer.a.qui.donner.vision" /> <Label fx:id="titre" layoutX="9.0" layoutY="82.0" text="Choisir un joueur à qui donner la carte vision" />
</children> </children>
</Pane> </Pane>
</children> </children>

View File

@ -6,11 +6,12 @@
<?import javafx.scene.layout.HBox?> <?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.Pane?> <?import javafx.scene.layout.Pane?>
<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="180.0" prefWidth="255.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1"> <AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="180.0" prefWidth="255.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1">
<children> <children>
<Pane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="180.0" prefWidth="255.0" stylesheets="@style/popUp.css"> <Pane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="180.0" prefWidth="255.0" stylesheets="@style/popUp.css">
<children> <children>
<Label contentDisplay="CENTER" layoutX="77.0" layoutY="90.0" prefHeight="27.0" prefWidth="102.0" text="%se.passe.rien" textAlignment="CENTER" /> <Label contentDisplay="CENTER" layoutX="77.0" layoutY="90.0" prefHeight="27.0" prefWidth="102.0" text="Il ne se passe rien." textAlignment="CENTER" />
<HBox alignment="CENTER" layoutY="62.0" prefHeight="21.0" prefWidth="255.0"> <HBox alignment="CENTER" layoutY="62.0" prefHeight="21.0" prefWidth="255.0">
<children> <children>
<Label text="%joueur" /> <Label text="%joueur" />

View File

@ -11,7 +11,7 @@
<children> <children>
<Label fx:id="Titre" layoutX="9.0" layoutY="32.0" text="%attaquer.ou.soigner" /> <Label fx:id="Titre" layoutX="9.0" layoutY="32.0" text="%attaquer.ou.soigner" />
<Button fx:id="nonButton" layoutX="142.0" layoutY="119.0" mnemonicParsing="false" text="%se.soigner" /> <Button fx:id="nonButton" layoutX="142.0" layoutY="119.0" mnemonicParsing="false" text="%se.soigner" />
<Button fx:id="ouiButton" layoutX="29.0" layoutY="119.0" mnemonicParsing="false" text="%attaquer" /> <Button fx:id="ouiButton" layoutX="29.0" layoutY="119.0" mnemonicParsing="false" text="Attaquer !" />
</children> </children>
</Pane> </Pane>
</children> </children>

View File

@ -6,8 +6,8 @@
<Pane fx:id="rootPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="180.0" prefWidth="255.0" stylesheets="@style/popUp.css" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ihm.controller.ChoisirBoolean"> <Pane fx:id="rootPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="180.0" prefWidth="255.0" stylesheets="@style/popUp.css" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ihm.controller.ChoisirBoolean">
<children> <children>
<Button fx:id="nonButton" layoutX="136.0" layoutY="128.0" mnemonicParsing="false" text="%ne.pas.attaqur" /> <Button fx:id="nonButton" layoutX="136.0" layoutY="128.0" mnemonicParsing="false" text="Ne pas attaquer" />
<Label fx:id="titre" layoutX="40.0" layoutY="31.0" text="%voulez.vous.attaquer.joueur" /> <Label fx:id="titre" layoutX="40.0" layoutY="31.0" text="Voulez-vous attaquer un joueur ?" />
<Button fx:id="ouiButton" layoutX="21.0" layoutY="128.0" mnemonicParsing="false" text="%attaquer" /> <Button fx:id="ouiButton" layoutX="21.0" layoutY="128.0" mnemonicParsing="false" text="Attaquer !" />
</children> </children>
</Pane> </Pane>

View File

@ -78,7 +78,7 @@
</Button> </Button>
</children> </children>
</HBox> </HBox>
<Label fx:id="titre" layoutX="50.0" layoutY="82.0" text="%choisir.joueur.attaquer" /> <Label fx:id="titre" layoutX="50.0" layoutY="82.0" text="Choisir un joueur à attaquer !" />
</children> </children>
</Pane> </Pane>
</children> </children>

View File

@ -27,7 +27,7 @@
<Font size="48.0" /> <Font size="48.0" />
</font> </font>
</Label> </Label>
<Button fx:id="btnStop" layoutX="105.0" layoutY="144.0" mnemonicParsing="false" text="%stop" underline="true" /> <Button fx:id="btnStop" layoutX="105.0" layoutY="144.0" mnemonicParsing="false" text="Stop" />
</children> </children>
</Pane> </Pane>
</children> </children>

View File

@ -1,37 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.SplitPane?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.text.Font?>
<AnchorPane xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ihm.controller.LieuZJ">
<children>
<SplitPane dividerPositions="0.6212121212121212" styleClass="background" stylesheets="@style/plateau.css" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<items>
<AnchorPane>
<children>
<VBox alignment="CENTER" spacing="30.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<children>
<Label styleClass="text" text="%arriver.sur.carte.lieux" textOverrun="CLIP" wrapText="true">
<font>
<Font size="14.0" />
</font>
</Label>
<Button fx:id="okButton" mnemonicParsing="false" styleClass="bouton" text="%ok" />
</children>
</VBox>
</children>
</AnchorPane>
<AnchorPane>
<children>
<ImageView fx:id="imageView" fitHeight="158.0" fitWidth="132.0" pickOnBounds="true" preserveRatio="true" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0" />
</children>
</AnchorPane>
</items>
</SplitPane>
</children>
</AnchorPane>

View File

@ -21,7 +21,7 @@
<Font size="24.0" /> <Font size="24.0" />
</font> </font>
</Button> </Button>
<Button mnemonicParsing="false" onMouseClicked="#ouvrirParametres" styleClass="bouton" text="%parametre"> <Button mnemonicParsing="false" onMouseClicked="#ouvrirParametres" styleClass="bouton" text="Paramètres">
<font> <font>
<Font size="24.0" /> <Font size="24.0" />
</font> </font>
@ -31,7 +31,7 @@
<Font size="24.0" /> <Font size="24.0" />
</font> </font>
</Button> </Button>
<Button mnemonicParsing="false" onMouseClicked="#quitterLappli" styleClass="bouton" text="%quitter"> <Button mnemonicParsing="false" onMouseClicked="#quitterLappli" styleClass="bouton" text="Quitter">
<font> <font>
<Font size="24.0" /> <Font size="24.0" />
</font> </font>

View File

@ -4,7 +4,6 @@
<?import javafx.scene.control.Button?> <?import javafx.scene.control.Button?>
<?import javafx.scene.control.CheckBox?> <?import javafx.scene.control.CheckBox?>
<?import javafx.scene.control.Label?> <?import javafx.scene.control.Label?>
<?import javafx.scene.control.Slider?>
<?import javafx.scene.layout.AnchorPane?> <?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.HBox?> <?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.VBox?> <?import javafx.scene.layout.VBox?>
@ -14,74 +13,75 @@
<children> <children>
<VBox alignment="TOP_CENTER" prefHeight="480.0" prefWidth="640.0"> <VBox alignment="TOP_CENTER" prefHeight="480.0" prefWidth="640.0">
<children> <children>
<Label text="%pause"> <Label text="Pause">
<font> <font>
<Font size="48.0" /> <Font size="48.0" />
</font> </font>
</Label> </Label>
<HBox prefHeight="100.0" prefWidth="200.0"> <VBox>
<children> <children>
<VBox prefHeight="322.0" prefWidth="315.0"> <Label style="-fx-border-width: 0 0 0.5 0; -fx-border-color: #e2e2e2;" text="Sons">
<children>
<Label style="-fx-border-width: 0 0 0.5 0; -fx-border-color: #e2e2e2;" text="%sons">
<font> <font>
<Font size="18.0" /> <Font size="18.0" />
</font> </font>
</Label> </Label>
<HBox alignment="CENTER_LEFT"> <HBox alignment="CENTER_LEFT">
<children> <children>
<Label text="%musique"> <Label text="Musique">
<HBox.margin> <HBox.margin>
<Insets /> <Insets right="300.0" />
</HBox.margin> </HBox.margin>
<font> <font>
<Font size="14.0" /> <Font size="14.0" />
</font> </font>
</Label> </Label>
<CheckBox fx:id="cbMusique" mnemonicParsing="false">
<HBox.margin>
<Insets bottom="5.0" />
</HBox.margin>
</CheckBox>
</children> </children>
<VBox.margin> <VBox.margin>
<Insets bottom="5.0" /> <Insets bottom="5.0" />
</VBox.margin> </VBox.margin>
</HBox> </HBox>
<HBox> <HBox prefHeight="38.0" prefWidth="337.0">
<children> <children>
<Slider fx:id="sliderMusiquePause" blockIncrement="1.0" majorTickUnit="1.0" max="1.0" minorTickCount="10" onMouseClicked="#slideVolumeMusique" prefHeight="14.0" prefWidth="194.0" value="0.1" /> <Button mnemonicParsing="false" onMouseClicked="#monterVolume" text="Volume +">
<font>
<Font size="14.0" />
</font>
<HBox.margin>
<Insets right="10.0" />
</HBox.margin>
</Button>
<Button mnemonicParsing="false" onMouseClicked="#baisserVolume" text="Volume -">
<font>
<Font size="14.0" />
</font>
<HBox.margin>
<Insets left="10.0" />
</HBox.margin>
</Button>
</children> </children>
</HBox>
<Label prefHeight="18.0" prefWidth="198.0" styleClass="text" stylesheets="@style/plateau.css" text="The Red Fox Tavern - Curran Son">
<opaqueInsets>
<Insets />
</opaqueInsets>
<padding> <padding>
<Insets bottom="20.0" left="5.0" /> <Insets bottom="10.0" top="10.0" />
</padding> </padding>
</Label> </HBox>
<HBox alignment="CENTER_LEFT"> <HBox alignment="CENTER_LEFT">
<children> <children>
<Label text="%effet"> <Label text="Effet sonores">
<HBox.margin> <HBox.margin>
<Insets /> <Insets right="273.0" />
</HBox.margin> </HBox.margin>
<font> <font>
<Font size="14.0" /> <Font size="14.0" />
</font> </font>
</Label> </Label>
<CheckBox fx:id="cbEffet" mnemonicParsing="false" />
</children> </children>
</HBox> </HBox>
<HBox prefHeight="0.0" prefWidth="540.0"> <Label style="-fx-border-width: 0 0 0.5 0; -fx-border-color: #e2e2e2;" text="Jeux">
<children>
<Slider fx:id="sliderEffetsPause" blockIncrement="1.0" majorTickUnit="1.0" max="0.0" min="-20.0" minorTickCount="10" onMouseClicked="#slideVolumeEffets" prefHeight="14.0" prefWidth="194.0" />
</children>
</HBox>
<Button fx:id="reglesPause" mnemonicParsing="false" onMouseClicked="#afficherReglePause" text="%regles">
<font>
<Font size="14.0" />
</font>
<VBox.margin>
<Insets top="30.0" />
</VBox.margin>
</Button>
<Label style="-fx-border-width: 0 0 0.5 0; -fx-border-color: #e2e2e2;" text="%jeux">
<VBox.margin> <VBox.margin>
<Insets top="50.0" /> <Insets top="50.0" />
</VBox.margin> </VBox.margin>
@ -94,7 +94,7 @@
<Insets top="5.0" /> <Insets top="5.0" />
</VBox.margin> </VBox.margin>
<children> <children>
<Button mnemonicParsing="false" onMouseClicked="#reprendre" text="%reprendre.partie"> <Button mnemonicParsing="false" onMouseClicked="#reprendre" text="Reprendre la partie">
<HBox.margin> <HBox.margin>
<Insets right="25.0" /> <Insets right="25.0" />
</HBox.margin> </HBox.margin>
@ -102,36 +102,24 @@
<Font size="14.0" /> <Font size="14.0" />
</font> </font>
</Button> </Button>
<Button mnemonicParsing="false" onMouseClicked="#quitter" style="-fx-text-fill: red;" text="Quitter le jeu">
<HBox.margin>
<Insets left="25.0" />
</HBox.margin>
<font>
<Font size="14.0" />
</font>
</Button>
</children> </children>
</HBox> </HBox>
</children> </children>
<VBox.margin>
<Insets top="50.0" />
</VBox.margin>
<padding> <padding>
<Insets left="100.0" /> <Insets left="100.0" />
</padding> </padding>
</VBox> </VBox>
<VBox prefHeight="325.0" prefWidth="199.0">
<children>
<CheckBox fx:id="cbMusique" mnemonicParsing="false">
<VBox.margin>
<Insets bottom="50.0" top="30.0" />
</VBox.margin>
</CheckBox>
<CheckBox fx:id="cbEffet" alignment="CENTER" mnemonicParsing="false" />
<Button mnemonicParsing="false" onMouseClicked="#quitter" style="-fx-text-fill: red;" text="%quitter.jeu">
<font>
<Font size="14.0" />
</font>
<VBox.margin>
<Insets top="171.0" />
</VBox.margin>
</Button>
</children>
<HBox.margin>
<Insets />
</HBox.margin>
</VBox>
</children>
</HBox>
</children> </children>
</VBox> </VBox>
</children> </children>

View File

@ -5,7 +5,6 @@
<?import javafx.scene.Group?> <?import javafx.scene.Group?>
<?import javafx.scene.control.Button?> <?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?> <?import javafx.scene.control.Label?>
<?import javafx.scene.control.ScrollPane?>
<?import javafx.scene.image.Image?> <?import javafx.scene.image.Image?>
<?import javafx.scene.image.ImageView?> <?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.AnchorPane?> <?import javafx.scene.layout.AnchorPane?>
@ -16,15 +15,16 @@
<?import javafx.scene.layout.RowConstraints?> <?import javafx.scene.layout.RowConstraints?>
<?import javafx.scene.layout.StackPane?> <?import javafx.scene.layout.StackPane?>
<?import javafx.scene.layout.VBox?> <?import javafx.scene.layout.VBox?>
<?import javafx.scene.shape.Circle?>
<?import javafx.scene.text.Font?> <?import javafx.scene.text.Font?>
<AnchorPane fx:id="rootPane" styleClass="background" stylesheets="@style/plateau.css" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ihm.controller.PlateauController"> <AnchorPane fx:id="rootPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" styleClass="background" stylesheets="@style/plateau.css" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ihm.controller.PlateauController">
<children> <children>
<HBox alignment="CENTER" layoutX="14.0" spacing="100.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"> <HBox alignment="CENTER" layoutX="14.0" spacing="100.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<children> <children>
<Group> <Group>
<children> <children>
<GridPane hgap="50.0" rotate="90.0"> <GridPane hgap="50.0" prefWidth="885.0" rotate="90.0">
<columnConstraints> <columnConstraints>
<ColumnConstraints hgrow="ALWAYS" /> <ColumnConstraints hgrow="ALWAYS" />
<ColumnConstraints hgrow="ALWAYS" /> <ColumnConstraints hgrow="ALWAYS" />
@ -63,23 +63,13 @@
<Button mnemonicParsing="false" styleClass="bouton" stylesheets="@style/plateau.css" text="%se.reveler" GridPane.rowIndex="1" /> <Button mnemonicParsing="false" styleClass="bouton" stylesheets="@style/plateau.css" text="%se.reveler" GridPane.rowIndex="1" />
</children> </children>
</GridPane> </GridPane>
<ScrollPane fitToHeight="true" fitToWidth="true" hbarPolicy="NEVER" prefHeight="144.0" prefWidth="144.0" styleClass="pane" vbarPolicy="NEVER" GridPane.columnIndex="2" GridPane.rowIndex="1"> <FlowPane prefWidth="144.0" styleClass="tour" GridPane.columnIndex="2" GridPane.rowIndex="1">
<content>
<AnchorPane>
<children> <children>
<HBox styleClass="background" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0" /> <ImageView pickOnBounds="true" preserveRatio="true" />
</children> </children>
</AnchorPane> </FlowPane>
</content> <Label styleClass="text" stylesheets="@style/plateau.css" text="Equipements" GridPane.columnIndex="2" />
<padding>
<Insets bottom="2.0" left="2.0" right="2.0" top="2.0" />
</padding>
</ScrollPane>
<Label styleClass="text" stylesheets="@style/plateau.css" text="%equipement" GridPane.columnIndex="2" />
</children> </children>
<padding>
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
</padding>
</GridPane> </GridPane>
<GridPane nodeOrientation="RIGHT_TO_LEFT" GridPane.columnIndex="1"> <GridPane nodeOrientation="RIGHT_TO_LEFT" GridPane.columnIndex="1">
<columnConstraints> <columnConstraints>
@ -111,23 +101,13 @@
<Button mnemonicParsing="false" styleClass="bouton" stylesheets="@style/plateau.css" text="%se.reveler" GridPane.rowIndex="1" /> <Button mnemonicParsing="false" styleClass="bouton" stylesheets="@style/plateau.css" text="%se.reveler" GridPane.rowIndex="1" />
</children> </children>
</GridPane> </GridPane>
<ScrollPane fitToHeight="true" fitToWidth="true" hbarPolicy="NEVER" prefHeight="144.0" prefWidth="144.0" styleClass="pane" vbarPolicy="NEVER" GridPane.columnIndex="2" GridPane.rowIndex="1"> <FlowPane prefHeight="144.0" prefWidth="144.0" styleClass="tour" GridPane.columnIndex="2" GridPane.rowIndex="1">
<content>
<AnchorPane>
<children> <children>
<HBox styleClass="background" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0" /> <ImageView pickOnBounds="true" preserveRatio="true" />
</children> </children>
</AnchorPane> </FlowPane>
</content> <Label styleClass="text" stylesheets="@style/plateau.css" text="Equipements" GridPane.columnIndex="2" />
<padding>
<Insets bottom="2.0" left="2.0" right="2.0" top="2.0" />
</padding>
</ScrollPane>
<Label styleClass="text" stylesheets="@style/plateau.css" text="%equipement" GridPane.columnIndex="2" />
</children> </children>
<padding>
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
</padding>
</GridPane> </GridPane>
</children> </children>
<padding> <padding>
@ -141,13 +121,13 @@
</Group> </Group>
<VBox alignment="CENTER" spacing="100.0"> <VBox alignment="CENTER" spacing="100.0">
<children> <children>
<GridPane hgap="50.0" rotate="180.0" VBox.vgrow="ALWAYS"> <GridPane hgap="50.0" rotate="180.0">
<columnConstraints> <columnConstraints>
<ColumnConstraints hgrow="ALWAYS" /> <ColumnConstraints hgrow="ALWAYS" />
<ColumnConstraints hgrow="ALWAYS" /> <ColumnConstraints hgrow="ALWAYS" />
</columnConstraints> </columnConstraints>
<rowConstraints> <rowConstraints>
<RowConstraints vgrow="ALWAYS" /> <RowConstraints minHeight="10.0" vgrow="SOMETIMES" />
</rowConstraints> </rowConstraints>
<children> <children>
<GridPane nodeOrientation="LEFT_TO_RIGHT"> <GridPane nodeOrientation="LEFT_TO_RIGHT">
@ -180,23 +160,13 @@
<Button mnemonicParsing="false" styleClass="bouton" stylesheets="@style/plateau.css" text="%se.reveler" GridPane.rowIndex="1" /> <Button mnemonicParsing="false" styleClass="bouton" stylesheets="@style/plateau.css" text="%se.reveler" GridPane.rowIndex="1" />
</children> </children>
</GridPane> </GridPane>
<ScrollPane fitToHeight="true" fitToWidth="true" hbarPolicy="NEVER" prefHeight="144.0" prefWidth="144.0" styleClass="pane" vbarPolicy="NEVER" GridPane.columnIndex="2" GridPane.rowIndex="1"> <FlowPane prefWidth="144.0" styleClass="tour" GridPane.columnIndex="2" GridPane.rowIndex="1">
<content>
<AnchorPane>
<children> <children>
<HBox styleClass="background" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0" /> <ImageView pickOnBounds="true" preserveRatio="true" />
</children> </children>
</AnchorPane> </FlowPane>
</content> <Label styleClass="text" stylesheets="@style/plateau.css" text="Equipements" GridPane.columnIndex="2" />
<padding>
<Insets bottom="2.0" left="2.0" right="2.0" top="2.0" />
</padding>
</ScrollPane>
<Label styleClass="text" stylesheets="@style/plateau.css" text="%equipement" GridPane.columnIndex="2" />
</children> </children>
<padding>
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
</padding>
</GridPane> </GridPane>
<GridPane nodeOrientation="RIGHT_TO_LEFT" GridPane.columnIndex="1"> <GridPane nodeOrientation="RIGHT_TO_LEFT" GridPane.columnIndex="1">
<columnConstraints> <columnConstraints>
@ -228,34 +198,24 @@
<Button mnemonicParsing="false" styleClass="bouton" stylesheets="@style/plateau.css" text="%se.reveler" GridPane.rowIndex="1" /> <Button mnemonicParsing="false" styleClass="bouton" stylesheets="@style/plateau.css" text="%se.reveler" GridPane.rowIndex="1" />
</children> </children>
</GridPane> </GridPane>
<ScrollPane fitToHeight="true" fitToWidth="true" hbarPolicy="NEVER" prefHeight="144.0" prefWidth="144.0" styleClass="pane" vbarPolicy="NEVER" GridPane.columnIndex="2" GridPane.rowIndex="1"> <FlowPane prefWidth="144.0" styleClass="tour" GridPane.columnIndex="2" GridPane.rowIndex="1">
<content>
<AnchorPane>
<children> <children>
<HBox styleClass="background" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0" /> <ImageView pickOnBounds="true" preserveRatio="true" />
</children> </children>
</AnchorPane> </FlowPane>
</content> <Label styleClass="text" stylesheets="@style/plateau.css" text="Equipements" GridPane.columnIndex="2" />
<padding>
<Insets bottom="2.0" left="2.0" right="2.0" top="2.0" />
</padding>
</ScrollPane>
<Label styleClass="text" stylesheets="@style/plateau.css" text="%equipement" GridPane.columnIndex="2" />
</children> </children>
<padding>
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
</padding>
</GridPane> </GridPane>
</children> </children>
<padding> <padding>
<Insets bottom="25.0" /> <Insets bottom="25.0" />
</padding> </padding>
</GridPane> </GridPane>
<HBox alignment="CENTER" maxWidth="1280.0" spacing="50.0"> <HBox alignment="CENTER" maxHeight="600.0" maxWidth="1200.0" spacing="50.0" VBox.vgrow="ALWAYS">
<children> <children>
<VBox alignment="TOP_CENTER"> <VBox alignment="TOP_CENTER">
<children> <children>
<HBox styleClass="carteLumiere" stylesheets="@style/plateau.css"> <HBox prefHeight="100.0" prefWidth="200.0" styleClass="carteLumiere" stylesheets="@style/plateau.css">
<children> <children>
<ImageView fitHeight="97.8" fitWidth="70.05" pickOnBounds="true" preserveRatio="true" styleClass="background"> <ImageView fitHeight="97.8" fitWidth="70.05" pickOnBounds="true" preserveRatio="true" styleClass="background">
<image> <image>
@ -289,88 +249,110 @@
</VBox> </VBox>
<VBox alignment="CENTER" spacing="50.0"> <VBox alignment="CENTER" spacing="50.0">
<children> <children>
<GridPane alignment="CENTER" hgap="20.0" maxHeight="-Infinity" prefHeight="250.0"> <GridPane hgap="20.0" VBox.vgrow="ALWAYS">
<columnConstraints> <columnConstraints>
<ColumnConstraints hgrow="ALWAYS" /> <ColumnConstraints hgrow="SOMETIMES" />
<ColumnConstraints /> <ColumnConstraints hgrow="ALWAYS" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="ALWAYS" /> <ColumnConstraints hgrow="SOMETIMES" />
</columnConstraints> </columnConstraints>
<rowConstraints> <rowConstraints>
<RowConstraints vgrow="ALWAYS" /> <RowConstraints minHeight="10.0" vgrow="SOMETIMES" />
</rowConstraints> </rowConstraints>
<children> <children>
<GridPane>
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints vgrow="SOMETIMES" />
<RowConstraints vgrow="SOMETIMES" />
<RowConstraints vgrow="SOMETIMES" />
<RowConstraints vgrow="SOMETIMES" />
</rowConstraints>
<children>
<Circle fill="#ff1f1f" radius="10.0" stroke="BLACK" strokeType="INSIDE" />
<Circle fill="#ffd71f" radius="10.0" stroke="BLACK" strokeType="INSIDE" GridPane.rowIndex="1" />
<Circle fill="#ecff1f" radius="10.0" stroke="BLACK" strokeType="INSIDE" GridPane.rowIndex="2" />
<Circle fill="#64ff1f" radius="10.0" stroke="BLACK" strokeType="INSIDE" GridPane.rowIndex="3" />
</children>
</GridPane>
<GridPane fx:id="gridPaneLieux" hgap="20.0" GridPane.columnIndex="1"> <GridPane fx:id="gridPaneLieux" hgap="20.0" GridPane.columnIndex="1">
<columnConstraints> <columnConstraints>
<ColumnConstraints /> <ColumnConstraints hgrow="SOMETIMES" />
<ColumnConstraints /> <ColumnConstraints hgrow="SOMETIMES" />
<ColumnConstraints /> <ColumnConstraints hgrow="SOMETIMES" />
</columnConstraints> </columnConstraints>
<rowConstraints> <rowConstraints>
<RowConstraints vgrow="ALWAYS" /> <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints> </rowConstraints>
<children> <children>
<HBox alignment="CENTER" spacing="5.0" styleClass="lieux" stylesheets="@style/plateau.css"> <HBox alignment="TOP_CENTER" styleClass="lieux" stylesheets="@style/plateau.css">
<children> <children>
<StackPane HBox.hgrow="NEVER"> <StackPane>
<children> <children>
<ImageView pickOnBounds="true" preserveRatio="true" StackPane.alignment="CENTER" /> <FlowPane prefHeight="200.0" prefWidth="200.0" />
<FlowPane styleClass="lieu" /> <ImageView fitHeight="132.03" fitWidth="94.5675" pickOnBounds="true" preserveRatio="true" />
</children> </children>
</StackPane> </StackPane>
<StackPane layoutX="39.0" layoutY="12.0" maxHeight="360.0" HBox.hgrow="NEVER"> <StackPane layoutX="39.0" layoutY="12.0">
<children> <children>
<ImageView pickOnBounds="true" preserveRatio="true" /> <FlowPane prefHeight="200.0" prefWidth="200.0" />
<FlowPane /> <ImageView fitHeight="132.03" fitWidth="94.5675" pickOnBounds="true" preserveRatio="true" />
</children> </children>
</StackPane> </StackPane>
</children> </children>
<GridPane.margin>
<Insets />
</GridPane.margin>
<padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</padding>
</HBox> </HBox>
<HBox alignment="BOTTOM_CENTER" spacing="5.0" styleClass="lieux" stylesheets="@style/plateau.css" GridPane.columnIndex="1"> <HBox alignment="BOTTOM_CENTER" styleClass="lieux" stylesheets="@style/plateau.css" GridPane.columnIndex="1">
<children> <children>
<StackPane HBox.hgrow="NEVER"> <StackPane>
<children> <children>
<ImageView pickOnBounds="true" preserveRatio="true" /> <FlowPane prefHeight="200.0" prefWidth="200.0" />
<FlowPane /> <ImageView fitHeight="132.03" fitWidth="94.5675" pickOnBounds="true" preserveRatio="true" />
</children> </children>
</StackPane> </StackPane>
<StackPane HBox.hgrow="NEVER"> <StackPane>
<children> <children>
<ImageView pickOnBounds="true" preserveRatio="true" /> <FlowPane prefHeight="200.0" prefWidth="200.0" />
<FlowPane /> <ImageView fitHeight="132.03" fitWidth="94.5675" pickOnBounds="true" preserveRatio="true" />
</children> </children>
</StackPane> </StackPane>
</children> </children>
<padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</padding>
</HBox> </HBox>
<HBox alignment="TOP_CENTER" spacing="5.0" styleClass="lieux" stylesheets="@style/plateau.css" GridPane.columnIndex="2"> <HBox alignment="TOP_CENTER" styleClass="lieux" stylesheets="@style/plateau.css" GridPane.columnIndex="2">
<children> <children>
<StackPane maxHeight="360.0" HBox.hgrow="NEVER"> <StackPane>
<children> <children>
<ImageView pickOnBounds="true" preserveRatio="true" /> <FlowPane prefHeight="200.0" prefWidth="200.0" />
<FlowPane /> <ImageView fitHeight="132.03" fitWidth="94.5675" pickOnBounds="true" preserveRatio="true" />
</children> </children>
</StackPane> </StackPane>
<StackPane maxHeight="360.0" HBox.hgrow="NEVER"> <StackPane>
<children> <children>
<ImageView pickOnBounds="true" preserveRatio="true" /> <FlowPane prefHeight="200.0" prefWidth="200.0" />
<FlowPane /> <ImageView fitHeight="132.03" fitWidth="94.5675" pickOnBounds="true" preserveRatio="true" />
</children> </children>
</StackPane> </StackPane>
</children> </children>
<padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</padding>
</HBox> </HBox>
</children> </children>
</GridPane> </GridPane>
<GridPane GridPane.columnIndex="2">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints vgrow="SOMETIMES" />
<RowConstraints vgrow="SOMETIMES" />
<RowConstraints vgrow="SOMETIMES" />
<RowConstraints vgrow="SOMETIMES" />
</rowConstraints>
<children>
<Circle fill="#21ffee" radius="10.0" stroke="BLACK" strokeType="INSIDE" />
<Circle fill="#2168ff" radius="10.0" stroke="BLACK" strokeType="INSIDE" GridPane.rowIndex="1" />
<Circle fill="#d921ff" radius="10.0" stroke="BLACK" strokeType="INSIDE" GridPane.rowIndex="2" />
<Circle fill="#ff21ad" radius="10.0" stroke="BLACK" strokeType="INSIDE" GridPane.rowIndex="3" />
</children>
</GridPane>
</children> </children>
</GridPane> </GridPane>
<Button mnemonicParsing="false" onMouseClicked="#mettreEnPause" styleClass="boutonPause"> <Button mnemonicParsing="false" onMouseClicked="#mettreEnPause" styleClass="boutonPause">
@ -385,97 +367,6 @@
<Insets bottom="-50.0" top="-45.0" /> <Insets bottom="-50.0" top="-45.0" />
</VBox.margin> </VBox.margin>
</Button> </Button>
<GridPane alignment="CENTER" hgap="5.0" vgap="5.0">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints>
<VBox.margin>
<Insets bottom="-40.0" />
</VBox.margin>
<children>
<StackPane prefHeight="150.0" prefWidth="200.0" GridPane.columnIndex="8">
<children>
<VBox alignment="CENTER" prefHeight="200.0" prefWidth="100.0">
<children>
<Label styleClass="text" text="Allie" />
</children>
</VBox>
</children>
</StackPane>
<StackPane prefHeight="150.0" prefWidth="200.0" GridPane.columnIndex="10">
<children>
<VBox alignment="CENTER" prefHeight="200.0" prefWidth="100.0">
<children>
<Label styleClass="text" text="Bob" />
<Label layoutX="38.0" layoutY="16.0" styleClass="text" text="Emi" />
</children>
</VBox>
</children>
</StackPane>
<StackPane prefHeight="150.0" prefWidth="200.0" GridPane.columnIndex="11">
<children>
<VBox alignment="CENTER" prefHeight="200.0" prefWidth="100.0">
<children>
<Label styleClass="text" text="Charles" />
<Label layoutX="29.0" layoutY="16.0" styleClass="text" text="Metamorphe">
<font>
<Font size="10.0" />
</font></Label>
</children>
</VBox>
</children>
</StackPane>
<StackPane prefHeight="150.0" prefWidth="200.0" GridPane.columnIndex="12">
<children>
<VBox alignment="CENTER" prefHeight="200.0" prefWidth="100.0">
<children>
<Label styleClass="text" text="Franklin" />
</children>
</VBox>
</children>
</StackPane>
<StackPane prefHeight="150.0" prefWidth="200.0" GridPane.columnIndex="13">
<children>
<VBox alignment="CENTER" prefHeight="200.0" prefWidth="100.0">
<children>
<Label styleClass="text" text="Vampire" />
<Label layoutX="27.0" layoutY="16.0" styleClass="text" text="Daniel" />
</children>
</VBox>
</children>
</StackPane>
<StackPane prefHeight="150.0" prefWidth="200.0" GridPane.columnIndex="14">
<children>
<VBox alignment="CENTER" prefHeight="200.0" prefWidth="100.0">
<children>
<Label styleClass="text" text="Loup-Garou">
<font>
<Font size="10.0" />
</font></Label>
<Label layoutX="38.0" layoutY="16.0" styleClass="text" text="George" />
</children>
</VBox>
</children>
</StackPane>
</children>
</GridPane>
<GridPane fx:id="gridPaneVie" alignment="CENTER" hgap="5.0" vgap="5.0"> <GridPane fx:id="gridPaneVie" alignment="CENTER" hgap="5.0" vgap="5.0">
<columnConstraints> <columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" /> <ColumnConstraints hgrow="SOMETIMES" />
@ -672,126 +563,31 @@
</GridPane> </GridPane>
</children> </children>
</VBox> </VBox>
<VBox alignment="TOP_CENTER">
<children>
<HBox prefHeight="100.0" prefWidth="200.0" styleClass="carteLumiere" stylesheets="@style/plateau.css">
<children>
<ImageView fitHeight="97.8" fitWidth="70.05" pickOnBounds="true" preserveRatio="true" />
</children> </children>
</HBox> </HBox>
<GridPane hgap="50.0" VBox.vgrow="ALWAYS"> <HBox prefHeight="100.0" prefWidth="200.0" styleClass="carteVision" stylesheets="@style/plateau.css">
<columnConstraints>
<ColumnConstraints hgrow="ALWAYS" />
<ColumnConstraints hgrow="ALWAYS" />
</columnConstraints>
<rowConstraints>
<RowConstraints vgrow="ALWAYS" />
</rowConstraints>
<children> <children>
<GridPane nodeOrientation="LEFT_TO_RIGHT"> <ImageView fitHeight="97.8" fitWidth="70.05" pickOnBounds="true" preserveRatio="true" />
<columnConstraints> </children>
<ColumnConstraints halignment="CENTER" hgrow="SOMETIMES" /> <VBox.margin>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" /> <Insets bottom="30.0" top="30.0" />
<ColumnConstraints halignment="CENTER" hgrow="SOMETIMES" /> </VBox.margin>
</columnConstraints> </HBox>
<rowConstraints> <HBox prefHeight="100.0" prefWidth="200.0" styleClass="carteTenebre" stylesheets="@style/plateau.css">
<RowConstraints vgrow="SOMETIMES" />
<RowConstraints vgrow="SOMETIMES" />
</rowConstraints>
<children> <children>
<Label styleClass="text" stylesheets="@style/plateau.css" text="Nom joueur" /> <ImageView fitHeight="97.8" fitWidth="70.05" pickOnBounds="true" preserveRatio="true" />
<AnchorPane prefWidth="144.0" styleClass="tour" GridPane.rowIndex="1" />
<GridPane GridPane.columnIndex="1" GridPane.rowIndex="1">
<columnConstraints>
<ColumnConstraints halignment="CENTER" hgrow="SOMETIMES" />
</columnConstraints>
<rowConstraints>
<RowConstraints valignment="CENTER" vgrow="ALWAYS" />
<RowConstraints vgrow="SOMETIMES" />
</rowConstraints>
<children>
<ImageView fitHeight="115.0" fitWidth="98.0" pickOnBounds="true" preserveRatio="true" GridPane.hgrow="ALWAYS" GridPane.vgrow="ALWAYS">
<image>
<Image url="@img/dosCartesPersonnage.jpg" />
</image>
</ImageView>
<Button mnemonicParsing="false" styleClass="bouton" stylesheets="@style/plateau.css" text="%se.reveler" GridPane.rowIndex="1" />
</children> </children>
</GridPane> </HBox>
<ScrollPane fitToHeight="true" fitToWidth="true" hbarPolicy="NEVER" prefHeight="144.0" prefWidth="144.0" styleClass="pane" vbarPolicy="NEVER" GridPane.columnIndex="2" GridPane.rowIndex="1">
<content>
<AnchorPane>
<children>
<HBox styleClass="background" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0" />
</children>
</AnchorPane>
</content>
<GridPane.margin>
<Insets />
</GridPane.margin>
<padding>
<Insets bottom="2.0" left="2.0" right="2.0" top="2.0" />
</padding>
</ScrollPane>
<Label styleClass="text" stylesheets="@style/plateau.css" text="%equipement" GridPane.columnIndex="2" />
</children>
<padding>
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
</padding>
</GridPane>
<GridPane nodeOrientation="RIGHT_TO_LEFT" GridPane.columnIndex="1">
<columnConstraints>
<ColumnConstraints halignment="CENTER" hgrow="SOMETIMES" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints halignment="CENTER" hgrow="SOMETIMES" />
</columnConstraints>
<rowConstraints>
<RowConstraints vgrow="SOMETIMES" />
<RowConstraints vgrow="SOMETIMES" />
</rowConstraints>
<children>
<Label styleClass="text" stylesheets="@style/plateau.css" text="Nom joueur" />
<AnchorPane prefWidth="144.0" styleClass="tour" GridPane.rowIndex="1" />
<GridPane GridPane.columnIndex="1" GridPane.rowIndex="1">
<columnConstraints>
<ColumnConstraints halignment="CENTER" hgrow="SOMETIMES" />
</columnConstraints>
<rowConstraints>
<RowConstraints valignment="CENTER" vgrow="ALWAYS" />
<RowConstraints vgrow="SOMETIMES" />
</rowConstraints>
<children>
<ImageView fitHeight="115.0" fitWidth="98.0" pickOnBounds="true" preserveRatio="true" GridPane.hgrow="ALWAYS" GridPane.vgrow="ALWAYS">
<image>
<Image url="@img/dosCartesPersonnage.jpg" />
</image>
</ImageView>
<Button mnemonicParsing="false" styleClass="bouton" stylesheets="@style/plateau.css" text="%se.reveler" GridPane.rowIndex="1" />
</children>
</GridPane>
<ScrollPane fitToHeight="true" fitToWidth="true" hbarPolicy="NEVER" prefHeight="144.0" prefWidth="144.0" styleClass="pane" vbarPolicy="NEVER" GridPane.columnIndex="2" GridPane.rowIndex="1">
<content>
<AnchorPane>
<children>
<HBox styleClass="background" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0" />
</children>
</AnchorPane>
</content>
<padding>
<Insets bottom="2.0" left="2.0" right="2.0" top="2.0" />
</padding>
</ScrollPane>
<Label styleClass="text" stylesheets="@style/plateau.css" text="%equipement" GridPane.columnIndex="2" />
</children>
<padding>
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
</padding>
</GridPane>
</children>
<padding>
<Insets bottom="25.0" />
</padding>
</GridPane>
</children> </children>
</VBox> </VBox>
<Group> </children>
<children> </HBox>
<GridPane hgap="50.0" rotate="-90.0"> <GridPane hgap="50.0">
<columnConstraints> <columnConstraints>
<ColumnConstraints hgrow="ALWAYS" /> <ColumnConstraints hgrow="ALWAYS" />
<ColumnConstraints hgrow="ALWAYS" /> <ColumnConstraints hgrow="ALWAYS" />
@ -830,23 +626,13 @@
<Button mnemonicParsing="false" styleClass="bouton" stylesheets="@style/plateau.css" text="%se.reveler" GridPane.rowIndex="1" /> <Button mnemonicParsing="false" styleClass="bouton" stylesheets="@style/plateau.css" text="%se.reveler" GridPane.rowIndex="1" />
</children> </children>
</GridPane> </GridPane>
<ScrollPane fitToHeight="true" fitToWidth="true" hbarPolicy="NEVER" prefHeight="144.0" prefWidth="144.0" styleClass="pane" vbarPolicy="NEVER" GridPane.columnIndex="2" GridPane.rowIndex="1"> <FlowPane prefHeight="144.0" prefWidth="144.0" styleClass="tour" GridPane.columnIndex="2" GridPane.rowIndex="1">
<content>
<AnchorPane>
<children> <children>
<HBox styleClass="background" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0" /> <ImageView pickOnBounds="true" preserveRatio="true" />
</children> </children>
</AnchorPane> </FlowPane>
</content> <Label styleClass="text" stylesheets="@style/plateau.css" text="Equipements" GridPane.columnIndex="2" />
<padding>
<Insets bottom="2.0" left="2.0" right="2.0" top="2.0" />
</padding>
</ScrollPane>
<Label styleClass="text" stylesheets="@style/plateau.css" text="%equipement" GridPane.columnIndex="2" />
</children> </children>
<padding>
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
</padding>
</GridPane> </GridPane>
<GridPane nodeOrientation="RIGHT_TO_LEFT" GridPane.columnIndex="1"> <GridPane nodeOrientation="RIGHT_TO_LEFT" GridPane.columnIndex="1">
<columnConstraints> <columnConstraints>
@ -878,25 +664,109 @@
<Button mnemonicParsing="false" styleClass="bouton" stylesheets="@style/plateau.css" text="%se.reveler" GridPane.rowIndex="1" /> <Button mnemonicParsing="false" styleClass="bouton" stylesheets="@style/plateau.css" text="%se.reveler" GridPane.rowIndex="1" />
</children> </children>
</GridPane> </GridPane>
<ScrollPane fitToHeight="true" fitToWidth="true" hbarPolicy="NEVER" prefHeight="144.0" prefWidth="144.0" styleClass="pane" vbarPolicy="NEVER" GridPane.columnIndex="2" GridPane.rowIndex="1"> <FlowPane prefHeight="144.0" prefWidth="144.0" styleClass="tour" GridPane.columnIndex="2" GridPane.rowIndex="1">
<content>
<AnchorPane>
<children> <children>
<HBox styleClass="background" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0" /> <ImageView pickOnBounds="true" preserveRatio="true" />
</children> </children>
</AnchorPane> </FlowPane>
</content> <Label styleClass="text" stylesheets="@style/plateau.css" text="Equipements" GridPane.columnIndex="2" />
<padding> </children>
<Insets bottom="2.0" left="2.0" right="2.0" top="2.0" /> </GridPane>
</padding>
</ScrollPane>
<Label styleClass="text" stylesheets="@style/plateau.css" text="%equipement" GridPane.columnIndex="2" />
</children> </children>
<padding> <padding>
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" /> <Insets bottom="25.0" />
</padding> </padding>
</GridPane> </GridPane>
</children> </children>
</VBox>
<Group>
<children>
<GridPane hgap="50.0" prefWidth="885.0" rotate="-90.0">
<columnConstraints>
<ColumnConstraints hgrow="ALWAYS" />
<ColumnConstraints hgrow="ALWAYS" />
</columnConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<GridPane nodeOrientation="LEFT_TO_RIGHT">
<columnConstraints>
<ColumnConstraints halignment="CENTER" hgrow="SOMETIMES" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints halignment="CENTER" hgrow="SOMETIMES" />
</columnConstraints>
<rowConstraints>
<RowConstraints vgrow="SOMETIMES" />
<RowConstraints vgrow="SOMETIMES" />
</rowConstraints>
<children>
<Label styleClass="text" stylesheets="@style/plateau.css" text="Nom joueur" />
<AnchorPane prefWidth="144.0" styleClass="tour" GridPane.rowIndex="1" />
<GridPane GridPane.columnIndex="1" GridPane.rowIndex="1">
<columnConstraints>
<ColumnConstraints halignment="CENTER" hgrow="SOMETIMES" />
</columnConstraints>
<rowConstraints>
<RowConstraints valignment="CENTER" vgrow="ALWAYS" />
<RowConstraints vgrow="SOMETIMES" />
</rowConstraints>
<children>
<ImageView fitHeight="115.0" fitWidth="98.0" pickOnBounds="true" preserveRatio="true" GridPane.hgrow="ALWAYS" GridPane.vgrow="ALWAYS">
<image>
<Image url="@img/dosCartesPersonnage.jpg" />
</image>
</ImageView>
<Button mnemonicParsing="false" styleClass="bouton" stylesheets="@style/plateau.css" text="%se.reveler" GridPane.rowIndex="1" />
</children>
</GridPane>
<FlowPane prefWidth="144.0" styleClass="tour" GridPane.columnIndex="2" GridPane.rowIndex="1">
<children>
<ImageView pickOnBounds="true" preserveRatio="true" />
</children>
</FlowPane>
<Label styleClass="text" stylesheets="@style/plateau.css" text="Equipements" GridPane.columnIndex="2" />
</children>
</GridPane>
<GridPane nodeOrientation="RIGHT_TO_LEFT" GridPane.columnIndex="1">
<columnConstraints>
<ColumnConstraints halignment="CENTER" hgrow="SOMETIMES" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints halignment="CENTER" hgrow="SOMETIMES" />
</columnConstraints>
<rowConstraints>
<RowConstraints vgrow="SOMETIMES" />
<RowConstraints vgrow="SOMETIMES" />
</rowConstraints>
<children>
<Label styleClass="text" stylesheets="@style/plateau.css" text="Nom joueur" />
<AnchorPane prefWidth="144.0" styleClass="tour" GridPane.rowIndex="1" />
<GridPane GridPane.columnIndex="1" GridPane.rowIndex="1">
<columnConstraints>
<ColumnConstraints halignment="CENTER" hgrow="SOMETIMES" />
</columnConstraints>
<rowConstraints>
<RowConstraints valignment="CENTER" vgrow="ALWAYS" />
<RowConstraints vgrow="SOMETIMES" />
</rowConstraints>
<children>
<ImageView fitHeight="115.0" fitWidth="98.0" pickOnBounds="true" preserveRatio="true" GridPane.hgrow="ALWAYS" GridPane.vgrow="ALWAYS">
<image>
<Image url="@img/dosCartesPersonnage.jpg" />
</image>
</ImageView>
<Button mnemonicParsing="false" styleClass="bouton" stylesheets="@style/plateau.css" text="%se.reveler" GridPane.rowIndex="1" />
</children>
</GridPane>
<FlowPane prefHeight="144.0" prefWidth="144.0" styleClass="tour" GridPane.columnIndex="2" GridPane.rowIndex="1">
<children>
<ImageView pickOnBounds="true" preserveRatio="true" />
</children>
</FlowPane>
<Label styleClass="text" stylesheets="@style/plateau.css" text="Equipements" GridPane.columnIndex="2" />
</children>
</GridPane>
</children>
<padding> <padding>
<Insets bottom="25.0" /> <Insets bottom="25.0" />
</padding> </padding>

View File

@ -1,37 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.SplitPane?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.text.Font?>
<AnchorPane prefHeight="344.0" prefWidth="385.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ihm.controller.RecevoirCarte">
<children>
<SplitPane dividerPositions="0.9921671018276762" styleClass="background" stylesheets="@style/plateau.css" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<items>
<AnchorPane>
<children>
<VBox alignment="CENTER" spacing="30.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<children>
<Label fx:id="label" minHeight="0.0" minWidth="0.0" styleClass="text" text="%glisser.barre" textOverrun="CLIP" wrapText="true">
<font>
<Font size="14.0" />
</font>
</Label>
<Button fx:id="okButton" minHeight="0.0" minWidth="0.0" mnemonicParsing="false" styleClass="bouton" text="%ok" />
</children>
</VBox>
</children>
</AnchorPane>
<AnchorPane>
<children>
<ImageView fx:id="imageView" pickOnBounds="true" preserveRatio="true" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0" />
</children>
</AnchorPane>
</items>
</SplitPane>
</children>
</AnchorPane>

View File

@ -19,7 +19,7 @@
</ImageView> </ImageView>
<HBox alignment="CENTER" prefHeight="100.0" prefWidth="200.0"> <HBox alignment="CENTER" prefHeight="100.0" prefWidth="200.0">
<children> <children>
<Button fx:id="precedent" layoutX="519.0" layoutY="31.0" mnemonicParsing="false" onMouseClicked="#pagePrecedente" prefHeight="59.0" prefWidth="225.0" styleClass="bouton" text="%page.precedente"> <Button layoutX="519.0" layoutY="31.0" mnemonicParsing="false" onMouseClicked="#pagePrecedente" prefHeight="59.0" prefWidth="225.0" styleClass="bouton" text="Page précédente">
<font> <font>
<Font size="24.0" /> <Font size="24.0" />
</font> </font>
@ -27,7 +27,7 @@
<Insets right="20.0" /> <Insets right="20.0" />
</HBox.margin> </HBox.margin>
</Button> </Button>
<Button mnemonicParsing="false" onMouseClicked="#retourMenu" prefHeight="59.0" prefWidth="106.0" styleClass="bouton" text="%menu"> <Button mnemonicParsing="false" onMouseClicked="#retourMenu" prefHeight="59.0" prefWidth="106.0" styleClass="bouton" text="Menu">
<font> <font>
<Font size="24.0" /> <Font size="24.0" />
</font> </font>
@ -35,7 +35,7 @@
<Insets left="20.0" right="20.0" /> <Insets left="20.0" right="20.0" />
</HBox.margin> </HBox.margin>
</Button> </Button>
<Button fx:id="suivant" mnemonicParsing="false" onMouseClicked="#pageSuivante" prefHeight="59.0" prefWidth="195.0" styleClass="bouton" text="%page.suivante"> <Button mnemonicParsing="false" onMouseClicked="#pageSuivante" prefHeight="59.0" prefWidth="195.0" styleClass="bouton" text="Page suivante">
<font> <font>
<Font size="24.0" /> <Font size="24.0" />
</font> </font>

View File

@ -1,51 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.text.Font?>
<AnchorPane fx:id="rootPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="800.0" prefWidth="1280.0" styleClass="background" stylesheets="@style/plateau.css" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ihm.controller.ReglesControlleur">
<children>
<VBox alignment="CENTER" layoutX="-3.0" layoutY="-7.0" prefHeight="802.0" prefWidth="1290.0">
<children>
<ImageView fx:id="imageRegles" fitHeight="654.0" fitWidth="528.0" pickOnBounds="true" preserveRatio="true">
<VBox.margin>
<Insets />
</VBox.margin>
</ImageView>
<HBox alignment="CENTER" prefHeight="100.0" prefWidth="200.0">
<children>
<Button fx:id="precedent" layoutX="519.0" layoutY="31.0" mnemonicParsing="false" onMouseClicked="#pagePrecedente" prefHeight="59.0" prefWidth="225.0" styleClass="bouton" text="%page.precedente">
<font>
<Font size="24.0" />
</font>
<HBox.margin>
<Insets right="20.0" />
</HBox.margin>
</Button>
<Button mnemonicParsing="false" onMouseClicked="#retourEnJeu" prefHeight="59.0" prefWidth="117.0" styleClass="bouton" text="%retour">
<font>
<Font size="24.0" />
</font>
<HBox.margin>
<Insets left="20.0" right="20.0" />
</HBox.margin>
</Button>
<Button fx:id="suivant" mnemonicParsing="false" onMouseClicked="#pageSuivante" prefHeight="59.0" prefWidth="195.0" styleClass="bouton" text="%page.suivante">
<font>
<Font size="24.0" />
</font>
<HBox.margin>
<Insets left="20.0" />
</HBox.margin>
</Button>
</children>
</HBox>
</children>
</VBox>
</children>
</AnchorPane>

View File

@ -13,7 +13,7 @@
<children> <children>
<VBox fx:id="root" alignment="CENTER" layoutY="-1.0" prefHeight="480.0" prefWidth="640.0"> <VBox fx:id="root" alignment="CENTER" layoutY="-1.0" prefHeight="480.0" prefWidth="640.0">
<children> <children>
<Label text="%vousetes"> <Label text="Vous êtes :">
<font> <font>
<Font size="24.0" /> <Font size="24.0" />
</font> </font>

View File

@ -3,26 +3,16 @@
<?import javafx.scene.control.Button?> <?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?> <?import javafx.scene.control.Label?>
<?import javafx.scene.layout.AnchorPane?> <?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.text.Font?> <?import javafx.scene.text.Font?>
<AnchorPane fx:id="root" minHeight="0.0" minWidth="0.0" prefHeight="289.0" prefWidth="450.0" styleClass="background" stylesheets="@style/plateau.css" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ihm.controller.ChoisirBoolean"> <AnchorPane fx:id="root" minHeight="0.0" minWidth="0.0" prefHeight="129.0" prefWidth="201.0" style="-fx-background-color: white;" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ihm.controller.ChoisirBoolean">
<children> <children>
<VBox alignment="CENTER" layoutX="37.0" layoutY="14.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"> <Label fx:id="titre" layoutX="8.0" layoutY="-11.0" prefHeight="26.0" prefWidth="128.0" text="Voulez vous faire cette action ?" AnchorPane.bottomAnchor="77.0" AnchorPane.leftAnchor="8.0" AnchorPane.rightAnchor="7.0" AnchorPane.topAnchor="-11.0">
<children>
<Label fx:id="titre" alignment="CENTER" prefHeight="88.0" prefWidth="158.0" styleClass="text" text="%voulez.vous.faire.action" wrapText="true">
<font> <font>
<Font size="13.0" /> <Font size="13.0" />
</font> </font>
</Label> </Label>
<HBox alignment="CENTER"> <Button fx:id="ouiButton" layoutX="34.0" layoutY="85.0" mnemonicParsing="false" prefHeight="30.0" prefWidth="45.0" text="Oui" AnchorPane.bottomAnchor="14.0" AnchorPane.leftAnchor="34.0" AnchorPane.rightAnchor="122.0" AnchorPane.topAnchor="85.0" />
<children> <Button fx:id="nonButton" layoutX="126.0" layoutY="85.0" mnemonicParsing="false" prefHeight="30.0" prefWidth="45.0" text="Non" AnchorPane.bottomAnchor="14.0" AnchorPane.leftAnchor="126.0" AnchorPane.rightAnchor="30.0" AnchorPane.topAnchor="85.0" />
<Button fx:id="ouiButton" mnemonicParsing="false" prefHeight="30.0" prefWidth="45.0" styleClass="bouton" text="%oui" />
<Button fx:id="nonButton" mnemonicParsing="false" prefHeight="30.0" prefWidth="45.0" styleClass="bouton" text="%non" />
</children>
</HBox>
</children>
</VBox>
</children> </children>
</AnchorPane> </AnchorPane>

View File

@ -1,88 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.text.Font?>
<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ihm.controller.ChoisirJoueur">
<children>
<VBox alignment="CENTER" spacing="40.0" styleClass="background" stylesheets="@style/plateau.css" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<children>
<HBox fx:id="joueurHaut" alignment="TOP_CENTER" spacing="3.0">
<children>
<Button fx:id="btn1" mnemonicParsing="false" styleClass="bouton" text="%joueur1">
<font>
<Font size="10.0" />
</font>
</Button>
<Button fx:id="btn2" mnemonicParsing="false" styleClass="bouton" text="%joueur2">
<font>
<Font size="10.0" />
</font>
<HBox.margin>
<Insets left="2.0" />
</HBox.margin>
</Button>
<Button fx:id="btn3" mnemonicParsing="false" styleClass="bouton" text="%joueur3">
<font>
<Font size="10.0" />
</font>
<HBox.margin>
<Insets left="2.0" />
</HBox.margin>
</Button>
<Button fx:id="btn4" mnemonicParsing="false" styleClass="bouton" text="%joueur4">
<font>
<Font size="10.0" />
</font>
<HBox.margin>
<Insets left="2.0" />
</HBox.margin>
</Button>
</children>
</HBox>
<Label fx:id="titre" alignment="CENTER" contentDisplay="CENTER" styleClass="text" text="%choisir.joueur.attaquer" />
<HBox fx:id="joueurBas" alignment="BOTTOM_CENTER" spacing="3.0">
<children>
<Button fx:id="btn5" mnemonicParsing="false" styleClass="bouton" text="%joueur5">
<font>
<Font size="10.0" />
</font>
<HBox.margin>
<Insets right="2.0" />
</HBox.margin>
</Button>
<Button fx:id="btn6" mnemonicParsing="false" styleClass="bouton" text="%joueur6">
<font>
<Font size="10.0" />
</font>
<HBox.margin>
<Insets right="2.0" />
</HBox.margin>
</Button>
<Button fx:id="btn7" mnemonicParsing="false" styleClass="bouton" text="%joueur7">
<font>
<Font size="10.0" />
</font>
<HBox.margin>
<Insets right="2.0" />
</HBox.margin>
</Button>
<Button fx:id="btn8" mnemonicParsing="false" styleClass="bouton" text="%joueur8">
<font>
<Font size="10.0" />
</font>
</Button>
</children>
</HBox>
</children>
<padding>
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
</padding>
</VBox>
</children>
</AnchorPane>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

Some files were not shown because too many files have changed in this diff Show More