Merge development into master
BIN
shDBlatest.sql
@ -12,7 +12,8 @@ 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("","");
|
||||||
this.condition = new Condition();
|
this.condition = new Condition();
|
||||||
@ -21,12 +22,11 @@ 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;
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -17,6 +17,7 @@ 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);
|
||||||
|
@ -53,6 +53,11 @@ 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;
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,6 @@ 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;
|
||||||
|
|
||||||
@ -24,8 +23,10 @@ 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 p = (Pioche) j.choisir(pioches, Pioche.class);
|
||||||
Carte c = p.piocher();
|
System.out.println(pioches+ " "+p);
|
||||||
|
System.out.println(p.getStack());
|
||||||
|
Carte c = p.piocher(j);
|
||||||
c.utiliser(j);
|
c.utiliser(j);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,7 +31,8 @@ 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) {
|
||||||
CartePiochable carte = pioche.piocher();
|
System.out.println(pioche);
|
||||||
|
CartePiochable carte = pioche.piocher(j);
|
||||||
carte.utiliser(j);
|
carte.utiliser(j);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@ 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{
|
||||||
@ -20,10 +21,12 @@ 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);
|
||||||
}
|
}
|
||||||
@ -38,7 +41,10 @@ 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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
44
src/carte/CarteVision.java
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -9,6 +9,7 @@ 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;
|
||||||
@ -22,6 +23,7 @@ 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;
|
||||||
@ -39,13 +41,18 @@ import personnage.Vampire;
|
|||||||
|
|
||||||
public class CreatingCardsTest {
|
public class CreatingCardsTest {
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void init() {
|
||||||
|
|
||||||
// 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))));
|
||||||
|
|
||||||
@ -114,19 +121,19 @@ public class CreatingCardsTest {
|
|||||||
|
|
||||||
// Araignée Sanguinaire
|
// Araignée Sanguinaire
|
||||||
|
|
||||||
DatabaseManager.queryInsertObject(17, new CartePiochable(CartePiochable.Type.TENEBRE,new EffetMultiple(new EffetCiblerTous(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP, -2, true)),
|
DatabaseManager.queryInsertObject(17, new CartePiochable(CartePiochable.Type.TENEBRE,new EffetMultiple(new EffetChoisirCible(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 EffetCiblerTous(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP, -2, true)),
|
DatabaseManager.queryInsertObject(18, new CartePiochable(CartePiochable.Type.TENEBRE,new EffetMultiple(new EffetChoisirCible(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 EffetCiblerTous(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP, -2, true)),
|
DatabaseManager.queryInsertObject(19, new CartePiochable(CartePiochable.Type.TENEBRE,new EffetMultiple(new EffetChoisirCible(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 EffetCiblerTous(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP, -2, true)),
|
DatabaseManager.queryInsertObject(20, new CartePiochable(CartePiochable.Type.TENEBRE,new EffetMultiple(new EffetChoisirCible(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
|
||||||
@ -135,6 +142,11 @@ 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))));
|
||||||
|
|
||||||
@ -151,6 +163,7 @@ 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))
|
||||||
@ -165,26 +178,27 @@ 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 CartePiochable(CartePiochable.Type.VISION,new EffetChoisirCible(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP, -1, true)),
|
DatabaseManager.queryInsertObject(33, new CarteVision(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 CartePiochable(CartePiochable.Type.VISION,new EffetChoisirEffet(new EffetChoisirCible(new ActionVoler(ActionVoler.DONNER)),new EffetChoisirCible(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP,-1,true))),
|
DatabaseManager.queryInsertObject(34,new CarteVision(new ActionMultipleChoisir(new ActionVoler(ActionVoler.DONNER),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 CartePiochable(CartePiochable.Type.VISION,new EffetChoisirEffet(new EffetChoisirCible(new ActionVoler(ActionVoler.DONNER)),new EffetChoisirCible(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP,-1,true))),
|
DatabaseManager.queryInsertObject(35,new CarteVision(new ActionMultipleChoisir(new ActionVoler(ActionVoler.DONNER),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 CartePiochable(CartePiochable.Type.VISION,new EffetChoisirCible(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP, -2, true)),
|
DatabaseManager.queryInsertObject(36, new CarteVision(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)));
|
||||||
|
|
||||||
|
|
||||||
@ -192,35 +206,35 @@ public class CreatingCardsTest {
|
|||||||
|
|
||||||
// Vision enivrante
|
// Vision enivrante
|
||||||
|
|
||||||
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))),
|
DatabaseManager.queryInsertObject(38,new CarteVision(new ActionMultipleChoisir(new ActionVoler(ActionVoler.DONNER),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 CartePiochable(CartePiochable.Type.VISION,new EffetChoisirEffet(new EffetChoisirCible(new ActionVoler(ActionVoler.DONNER)),new EffetChoisirCible(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP,-1,true))),
|
DatabaseManager.queryInsertObject(39,new CarteVision( new ActionMultipleChoisir(new ActionVoler(ActionVoler.DONNER),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 CartePiochable(CartePiochable.Type.VISION,new EffetChoisirCible(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP,-1,true)),
|
DatabaseManager.queryInsertObject(40,new CarteVision(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 CartePiochable(CartePiochable.Type.VISION,new EffetChoisirEffet(new EffetChoisirCible(new ActionVoler(ActionVoler.DONNER)),new EffetChoisirCible(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP,-1,true))),
|
DatabaseManager.queryInsertObject(41,new CarteVision(new ActionMultipleChoisir(new ActionVoler(ActionVoler.DONNER),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 CartePiochable(CartePiochable.Type.VISION,new EffetChoisirEffet(new EffetChoisirCible(new ActionVoler(ActionVoler.DONNER)),new EffetChoisirCible(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP,-1,true))),
|
DatabaseManager.queryInsertObject(42,new CarteVision(new ActionMultipleChoisir(new ActionVoler(ActionVoler.DONNER),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 CartePiochable(CartePiochable.Type.VISION,new EffetChoisirCible(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP,-1,true)),
|
DatabaseManager.queryInsertObject(43,new CarteVision(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 CartePiochable(CartePiochable.Type.VISION,new EffetChoisirCible(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP,-2,true)),
|
DatabaseManager.queryInsertObject(45,new CarteVision(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP,-2,true),
|
||||||
new ConditionEquipe(CartePersonnage.Equipe.SHADOW)));
|
new ConditionEquipe(CartePersonnage.Equipe.SHADOW)));
|
||||||
|
|
||||||
// Vision réconfortante
|
// Vision réconfortante
|
||||||
@ -240,7 +254,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
|
||||||
|
|
||||||
|
|
||||||
@ -255,10 +269,8 @@ public class CreatingCardsTest {
|
|||||||
|
|
||||||
// 64
|
// 64
|
||||||
CarteLieu lieu3 = new CarteLieu(new Point(-1,9));
|
CarteLieu lieu3 = new CarteLieu(new Point(-1,9));
|
||||||
lieu3.setEffet(new EffetChoisirEffet(new EffetChoisirCible(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP,-2,true)),
|
lieu3.setEffet(new EffetChoisirCible(new ActionMultipleChoisir(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
|
||||||
@ -270,7 +282,7 @@ public class CreatingCardsTest {
|
|||||||
|
|
||||||
DatabaseManager.queryInsertObject(66,lieu5);
|
DatabaseManager.queryInsertObject(66,lieu5);
|
||||||
// 66
|
// 66
|
||||||
CarteLieu lieu6 = new CarteLieu(new Point(-1,9));
|
CarteLieu lieu6 = new CarteLieu(new Point(-1,10));
|
||||||
lieu6.setEffet(new EffetChoisirCible(new ActionVoler(ActionVoler.VOLER)));
|
lieu6.setEffet(new EffetChoisirCible(new ActionVoler(ActionVoler.VOLER)));
|
||||||
|
|
||||||
DatabaseManager.queryInsertObject(67,lieu6);
|
DatabaseManager.queryInsertObject(67,lieu6);
|
||||||
|
@ -19,15 +19,20 @@ 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 Connection connect() throws SQLException {
|
|
||||||
return DriverManager.getConnection(url, user, password);
|
public static void connect() throws SQLException {
|
||||||
}
|
if(connection == null || connection.isClosed()) {
|
||||||
|
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...");
|
||||||
@ -44,8 +49,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 (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...");
|
||||||
@ -93,8 +98,8 @@ public class DatabaseManager {
|
|||||||
query = "UPDATE " + table + " SET objet = ? "
|
query = "UPDATE " + table + " SET objet = ? "
|
||||||
+ " WHERE id = ? " ;
|
+ " WHERE id = ? " ;
|
||||||
|
|
||||||
Connection conn = connect();
|
connect();
|
||||||
PreparedStatement pst = conn.prepareStatement(query);
|
PreparedStatement pst = connection.prepareStatement(query);
|
||||||
pst.setBinaryStream(1, objectIS);
|
pst.setBinaryStream(1, objectIS);
|
||||||
pst.setInt(2, id);
|
pst.setInt(2, id);
|
||||||
pst.executeUpdate();
|
pst.executeUpdate();
|
||||||
|
@ -54,6 +54,8 @@ 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;
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
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;
|
||||||
@ -15,6 +16,8 @@ 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 {
|
||||||
@ -35,28 +38,32 @@ 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, Image> ressourcesCartes;
|
private Map<Carte, BufferedImage> ressourcesCartes;
|
||||||
private Map<String, Image> ressourcesDosCartes;
|
private Map<String, BufferedImage> ressourcesDosCartes;
|
||||||
|
|
||||||
|
|
||||||
public RessourceLoader() {
|
public RessourceLoader() {
|
||||||
this.ressourcesCartes = new HashMap<Carte,Image>();
|
this.ressourcesCartes = new HashMap<Carte,BufferedImage>();
|
||||||
this.ressourcesDosCartes = new HashMap<String, Image>();
|
this.ressourcesDosCartes = new HashMap<String, BufferedImage>();
|
||||||
}
|
}
|
||||||
|
|
||||||
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 < 61; i++) {
|
for(int i = 0; i < 67; i++) {
|
||||||
|
|
||||||
String query = QueryGenerator.selectId(i+1);
|
String query = QueryGenerator.selectId(i+1);
|
||||||
t.remplirTableQuery(query);
|
t.remplirTableQuery(query);
|
||||||
|
|
||||||
byte[] obj = t.getList().get(i).getObjet();
|
Record r = t.getList().get(i);
|
||||||
if(obj != null) {
|
byte[] obj = r.getObjet();
|
||||||
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -105,21 +112,21 @@ public class RessourceLoader {
|
|||||||
return is.readObject();
|
return is.readObject();
|
||||||
}
|
}
|
||||||
|
|
||||||
private Image loadImage(int id) throws IOException {
|
private BufferedImage loadImage(int id) throws IOException {
|
||||||
String name = ""+id+".png";
|
String name = ""+id+".png";
|
||||||
String url = "ressources/cartes/"+name;
|
String url = "ressources/cartes/"+name;
|
||||||
Image picture = ImageIO.read(new File(url));
|
BufferedImage picture = ImageIO.read(new File(url));
|
||||||
return picture;
|
return picture;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Map<Carte, Image> getMapImageCarte(Map<Integer, Carte> cartes) throws IOException{
|
private Map<Carte, BufferedImage> getMapImageCarte(Map<Integer, Carte> cartes) throws IOException{
|
||||||
|
|
||||||
Map<Carte, Image> mapCarteImage = new HashMap<Carte, Image>();
|
Map<Carte, BufferedImage> mapCarteImage = new HashMap<Carte, BufferedImage>();
|
||||||
|
|
||||||
for(Integer i : cartes.keySet()) {
|
for(Integer i : cartes.keySet()) {
|
||||||
|
|
||||||
Carte c = cartes.get(i);
|
Carte c = cartes.get(i);
|
||||||
Image img = loadImage(i);
|
BufferedImage img = loadImage(i);
|
||||||
mapCarteImage.put(c,img);
|
mapCarteImage.put(c,img);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -164,13 +171,12 @@ 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);
|
||||||
}
|
}
|
||||||
@ -208,4 +214,16 @@ 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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -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=Effet :
|
effet=Effets sonores :
|
||||||
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
|
||||||
@ -68,4 +68,49 @@ mode.claire=Mode clair
|
|||||||
musique=Musique
|
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
|
117
src/domaine/properties/langue_de.properties
Normal file
@ -0,0 +1,117 @@
|
|||||||
|
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?
|
@ -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 himslef
|
se.reveler=Reveal myself
|
||||||
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=Effect :
|
effet=Sound Effects:
|
||||||
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,4 +69,50 @@ mode.claire=Clear mode
|
|||||||
musique=Music
|
musique=Music
|
||||||
langue=Language
|
langue=Language
|
||||||
parametre=Setting
|
parametre=Setting
|
||||||
enregistrer=Enregistrer
|
enregistrer=Save
|
||||||
|
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?
|
@ -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=Effet :
|
effet=Effets sonores :
|
||||||
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
|
||||||
@ -68,4 +68,50 @@ mode.claire=Mode clair
|
|||||||
musique=Musique
|
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
|
||||||
|
117
src/domaine/properties/langue_it.properties
Normal file
@ -0,0 +1,117 @@
|
|||||||
|
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?
|
9
src/effet/Action.java
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
package effet;
|
||||||
|
|
||||||
|
import main.Joueur;
|
||||||
|
|
||||||
|
public abstract class Action {
|
||||||
|
|
||||||
|
public abstract void affecte(Joueur j1, Joueur j2);
|
||||||
|
|
||||||
|
}
|
53
src/effet/ActionAltererStatistiquesJoueur.java
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
33
src/effet/ActionMultiple.java
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -12,11 +12,13 @@ public class EffetChoisirCible extends Effet{
|
|||||||
@Override
|
@Override
|
||||||
public void utiliser(Joueur joueur) {
|
public void utiliser(Joueur joueur) {
|
||||||
|
|
||||||
Joueur j2 = joueur.choisiParmisTous();
|
Joueur j2 = choisirCible(joueur);
|
||||||
Action action = this.getAction();
|
Action action = this.getAction();
|
||||||
|
|
||||||
action.affecte(joueur, j2);
|
action.affecte(joueur, j2);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Joueur choisirCible(Joueur joueur) {
|
||||||
|
return joueur.choisiParmisTous();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,22 +1,30 @@
|
|||||||
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 = effets;
|
this.effets = Arrays.asList(effets);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void utiliser(Joueur joueur) {
|
public void utiliser(Joueur joueur) {
|
||||||
|
|
||||||
Effet effet = joueur.choisir(effets);
|
Effet e = choisirEffet(joueur);
|
||||||
|
e.utiliser(joueur);
|
||||||
effet.utiliser(joueur);
|
}
|
||||||
|
|
||||||
|
public Effet choisirEffet(Joueur joueur) {
|
||||||
|
return (Effet) joueur.choisir(effets,Effet.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -46,7 +46,7 @@ public class ActionAltererStatistiquesJoueur extends Action{
|
|||||||
{
|
{
|
||||||
j2.addToStat(key, valeur);
|
j2.addToStat(key, valeur);
|
||||||
}else {
|
}else {
|
||||||
j2.setStat(key, valeur);
|
j2.updateStat(key, valeur);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -58,8 +58,30 @@ 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";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -33,4 +33,9 @@ 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";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -18,5 +18,10 @@ public class ActionAttaquer extends Action {
|
|||||||
p.attaquer(j1, j2);
|
p.attaquer(j1, j2);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "Attaquer un joueur";
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -33,4 +33,9 @@ public class ActionMultiple extends Action{
|
|||||||
action.affecte(j1, j2);
|
action.affecte(j1, j2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<Action> getList(){
|
||||||
|
return this.actions;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
24
src/effet/action/ActionMultipleChoisir.java
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
@ -8,10 +8,14 @@ public class ActionReveal extends Action {
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private static final long serialVersionUID = 7972405763634156578L;
|
private static final long serialVersionUID = 7972405763634156578L;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void affecte(Joueur j1, Joueur j2) {
|
public void affecte(Joueur j1, Joueur j2) {
|
||||||
j2.reveal();
|
j2.reveal();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "Se réveler";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@ 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{
|
||||||
@ -32,24 +33,29 @@ 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(this.choix) {
|
if(!equipements.isEmpty()) {
|
||||||
|
|
||||||
List<CarteEquipement> equipements = j2.getEquipements();
|
|
||||||
|
|
||||||
// J1 choisit quel équipement voler
|
CarteEquipement equipement = null;
|
||||||
CarteEquipement equipement = (CarteEquipement) j1.choisir(equipements);
|
|
||||||
|
if(this.choix) {
|
||||||
|
// J1 choisit quel équipement voler
|
||||||
|
equipement = (CarteEquipement) j1.choisir(equipements, CarteEquipement.class);
|
||||||
|
}else {
|
||||||
|
|
||||||
|
// J1 choisit quel équipement voler
|
||||||
|
equipement = (CarteEquipement) j2.choisir(equipements,CarteEquipement.class);
|
||||||
|
}
|
||||||
|
|
||||||
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";
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
0
src/ihm/.gitkeep
Normal file
@ -3,10 +3,17 @@ 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, boolean ia) {
|
public Couple (String nom) {
|
||||||
this.nom = nom;
|
this.nom = nom;
|
||||||
this.ia = ia;
|
this.ia = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Couple (String nom, int niveau) {
|
||||||
|
this.nom = nom;
|
||||||
|
this.lvlIa = niveau;
|
||||||
|
this.ia = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getNom() {
|
public String getNom() {
|
||||||
@ -17,6 +24,7 @@ public class Couple {
|
|||||||
this.nom = nom;
|
this.nom = nom;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public boolean isIa() {
|
public boolean isIa() {
|
||||||
return ia;
|
return ia;
|
||||||
}
|
}
|
||||||
@ -25,4 +33,14 @@ public class Couple {
|
|||||||
this.ia = ia;
|
this.ia = ia;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getLvlIa() {
|
||||||
|
return lvlIa;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLvlIa(int lvlIa) {
|
||||||
|
this.lvlIa = lvlIa;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
40
src/ihm/Die.java
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
60
src/ihm/DieImages.java
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
@ -6,29 +6,36 @@ 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 {
|
||||||
|
|
||||||
static boolean soundOK;
|
static boolean soundOK;
|
||||||
|
|
||||||
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) {
|
||||||
|
|
||||||
if (soundOK == true) {
|
if (soundOK == true) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
InputStream soundPath = path;
|
InputStream soundPath = path;
|
||||||
|
|
||||||
if (soundPath!=null) {
|
if (soundPath != null) {
|
||||||
|
|
||||||
InputStream bufferedIn = new BufferedInputStream(soundPath);
|
InputStream bufferedIn = new BufferedInputStream(soundPath);
|
||||||
|
|
||||||
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 {
|
||||||
@ -40,7 +47,6 @@ public class EffetSonore {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isSoundOK() {
|
public static boolean isSoundOK() {
|
||||||
@ -51,10 +57,8 @@ public class EffetSonore {
|
|||||||
EffetSonore.soundOK = soundOK;
|
EffetSonore.soundOK = soundOK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void setVolumeEffets(double dValeur) {
|
||||||
|
lvVolumeEffet = (float) (dValeur);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
30
src/ihm/ImageViewEquipement.java
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -1,9 +1,11 @@
|
|||||||
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;
|
||||||
@ -14,15 +16,20 @@ 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", Locale.FRANCE);
|
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", ParametreController.LaLangue);
|
||||||
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
|
||||||
@ -35,13 +42,11 @@ 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);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -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;
|
||||||
static FloatControl volume ;
|
public static FloatControl volume ;
|
||||||
|
|
||||||
public static void playMusique(InputStream path) {
|
public static void playMusique(InputStream path) {
|
||||||
|
|
||||||
@ -61,5 +61,14 @@ public class Musique {
|
|||||||
public static void volumeDown(Float valeur) {
|
public static void volumeDown(Float valeur) {
|
||||||
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);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -62,6 +62,15 @@ public class PopUp{
|
|||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Stage getStage() {
|
||||||
|
return popup;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Scene getScene() {
|
||||||
|
return scene;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public void display() {
|
public void display() {
|
||||||
|
|
||||||
|
28
src/ihm/controller/AlterationVieZJ.java
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
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");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,33 +1,47 @@
|
|||||||
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 private Button ouiButton;
|
@FXML
|
||||||
@FXML private Button nonButton;
|
private Button ouiButton;
|
||||||
@FXML private Label titre;
|
@FXML
|
||||||
|
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) {
|
||||||
|
|
||||||
ouiButton.setOnAction(x -> {
|
ouiButton.setOnAction(x -> {
|
||||||
|
|
||||||
this.result = true;
|
this.result = true;
|
||||||
GestionnaireJeu.notifyPlateau();
|
GestionnaireJeu.notifyPlateau();
|
||||||
});
|
});
|
||||||
|
|
||||||
nonButton.setOnAction(x -> {
|
nonButton.setOnAction(x -> {
|
||||||
this.result = false;
|
this.result = false;
|
||||||
GestionnaireJeu.notifyPlateau();
|
GestionnaireJeu.notifyPlateau();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean getResult() {
|
public boolean getResult() {
|
||||||
@ -49,12 +63,72 @@ public class ChoisirBoolean implements Initializable {
|
|||||||
public void setNonButton(Button nonButton) {
|
public void setNonButton(Button nonButton) {
|
||||||
this.nonButton = nonButton;
|
this.nonButton = nonButton;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Label getTitre() {
|
public Label getTitre() {
|
||||||
return titre;
|
return titre;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTitre(Label titre) {
|
public void setTitre(Contexte c) {
|
||||||
this.titre = titre;
|
switch(c) {
|
||||||
|
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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,38 +1,34 @@
|
|||||||
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.image.Image;
|
import javafx.scene.control.Button;
|
||||||
import javafx.scene.image.ImageView;
|
import javafx.scene.image.ImageView;
|
||||||
import javafx.scene.layout.GridPane;
|
import javafx.scene.layout.GridPane;
|
||||||
import carte.CarteEquipement;
|
import javafx.scene.layout.HBox;
|
||||||
|
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() {
|
||||||
@ -58,5 +54,38 @@ public class ChoisirEquipement implements Initializable{
|
|||||||
public void setGrilleEquipement(GridPane grilleEquipement) {
|
public void setGrilleEquipement(GridPane grilleEquipement) {
|
||||||
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();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,44 +1,106 @@
|
|||||||
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 private HBox joueurHaut;
|
@FXML
|
||||||
@FXML private HBox joueurBas;
|
private HBox joueurHaut;
|
||||||
@FXML private Label titre;
|
@FXML
|
||||||
|
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 int joueurSelected;
|
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) {
|
||||||
for (int i=0; i<joueurHaut.getChildren().size(); i++) {
|
|
||||||
int numJoueur = i;
|
this.buttons = new ArrayList<Button>();
|
||||||
joueurHaut.getChildren().get(i).setOnMouseClicked(e -> {
|
|
||||||
System.out.println("Vous avez choisi le joueur " + (numJoueur+1));
|
this.buttons.add(btn1);
|
||||||
this.joueurSelected = numJoueur;
|
this.buttons.add(btn2);
|
||||||
|
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 i=0; i<joueurBas.getChildren().size(); i++) {
|
for (int j = i; j < buttons.size(); j++) {
|
||||||
int numJoueur = i+4;
|
Button b = this.buttons.get(j);
|
||||||
joueurBas.getChildren().get(i).setOnMouseClicked(e -> {
|
b.setVisible(false);
|
||||||
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;
|
||||||
}
|
}
|
||||||
@ -55,15 +117,50 @@ public class ChoisirJoueur implements Initializable{
|
|||||||
return titre;
|
return titre;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTitre(Label titre) {
|
public void setTitre(Contexte c) {
|
||||||
this.titre = titre;
|
switch (c) {
|
||||||
|
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 int getJoueurSelected() {
|
public JoueurIHM getJoueurSelected() {
|
||||||
return joueurSelected;
|
return joueurSelected;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setJoueurSelected(int joueurSelected) {
|
public void setListJoueursIHM(List<JoueurIHM> joueursIHM) {
|
||||||
this.joueurSelected = joueurSelected;
|
this.listJoueursIHM = joueursIHM;
|
||||||
|
}
|
||||||
|
|
||||||
|
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();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
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;
|
||||||
@ -8,16 +10,18 @@ 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("Souhaitez vous attaquer ?");
|
l.setText(bundle1.getString("souhaiter.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("Souhaitez vous activer l'effet du lieu ?");
|
l.setText(bundle1.getString("souhaiter.vous.activer.effet.lieu"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
28
src/ihm/controller/Dialog.java
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
133
src/ihm/controller/FinDePartieControlleur.java
Normal file
@ -0,0 +1,133 @@
|
|||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -44,8 +44,7 @@ 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);
|
||||||
|
|
||||||
fpNew.getChildren().add(pionVie);
|
if(!fpNew.getChildren().contains(pionVie)) fpNew.getChildren().add(pionVie);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -66,9 +65,10 @@ 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(0);
|
FlowPane fp = (FlowPane) sp.getChildren().get(1);
|
||||||
|
|
||||||
fp.getChildren().add(this.pionLieu);
|
if(!fp.getChildren().contains(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(2000));
|
translate.setDuration(Duration.millis(20000));
|
||||||
translate.setNode(p);
|
translate.setNode(p);
|
||||||
translate.play();
|
translate.play();
|
||||||
}
|
}
|
||||||
|
@ -1,20 +0,0 @@
|
|||||||
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());
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,7 +1,21 @@
|
|||||||
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;
|
||||||
@ -10,6 +24,7 @@ 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;
|
||||||
@ -21,80 +36,176 @@ public class JoueurIHM {
|
|||||||
private Pane zoneJoueur;
|
private Pane zoneJoueur;
|
||||||
private GestionnaireDePions gestionnaireDePions;
|
private GestionnaireDePions gestionnaireDePions;
|
||||||
private Color color;
|
private Color color;
|
||||||
|
private PlateauController pc;
|
||||||
public JoueurIHM(int i, Joueur joueur, Pane zoneJoueur, Color color, GridPane gridPaneVie, GridPane gridPaneLieux) {
|
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,
|
||||||
|
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(new Border(new BorderStroke(color, BorderStrokeStyle.SOLID, CornerRadii.EMPTY, new BorderWidths(5))));
|
|
||||||
|
zoneJoueur.setBorder(
|
||||||
|
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);;
|
||||||
this.joueur.reveal();
|
actionReveler(btn);
|
||||||
ImageView iv = this.getCartePersonnage();
|
|
||||||
// TODO
|
|
||||||
//this.joueur.getCartePersonnage().getId();
|
|
||||||
//iv.setImage(arg0);
|
|
||||||
System.out.println(joueur.getRevele());
|
|
||||||
btn.setDisable(true);
|
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
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);
|
||||||
|
|
||||||
|
ImageView iv = this.getCartePersonnage();
|
||||||
|
System.out.println(this.joueur.getCartePersonnage());
|
||||||
|
Image im = this.pc.getImageCarte(this.joueur.getCartePersonnage());
|
||||||
|
GridPane gp = (GridPane) iv.getParent();
|
||||||
|
iv.setImage(im);
|
||||||
|
iv.fitHeightProperty().bind(gp.heightProperty());
|
||||||
|
initButtonEffect(btn);
|
||||||
|
btn.setText(bundle1.getString("utilier.effet"));
|
||||||
|
estRevele = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Button getRevealButton() {
|
public Button getRevealButton() {
|
||||||
Pane p = (Pane) zoneJoueur.getChildren().get(2);
|
Pane p = (Pane) zoneJoueur.getChildren().get(2);
|
||||||
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);
|
||||||
|
|
||||||
//ap.prefWidthProperty().bind(ap.widthProperty());
|
// ap.prefWidthProperty().bind(ap.widthProperty());
|
||||||
//ap.prefHeightProperty().bind(ap.heightProperty());
|
// ap.prefHeightProperty().bind(ap.heightProperty());
|
||||||
|
|
||||||
AnchorPane.setBottomAnchor(p,0.0);
|
AnchorPane.setBottomAnchor(p, 0.0);
|
||||||
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setLabelJoueur(String name) {
|
public void setLabelJoueur(String name) {
|
||||||
Label label = getLabelJoueur();
|
Label label = getLabelJoueur();
|
||||||
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;
|
||||||
@ -111,18 +222,62 @@ public class JoueurIHM {
|
|||||||
public void setJoueur(Joueur joueur) {
|
public void setJoueur(Joueur joueur) {
|
||||||
this.joueur = joueur;
|
this.joueur = joueur;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void deplacerPionVie(int damage) {
|
public void deplacerPionVie(int damage) {
|
||||||
this.gestionnaireDePions.deplacerPionVie(damage);
|
this.gestionnaireDePions.deplacerPionVie(damage);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void replacerPionLieu() {
|
public void replacerPionLieu() {
|
||||||
this.gestionnaireDePions.deplacerPionLieux(this.joueur);
|
this.gestionnaireDePions.deplacerPionLieux(this.joueur);
|
||||||
}
|
}
|
||||||
|
|
||||||
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();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,57 +1,208 @@
|
|||||||
package ihm.controller;
|
package ihm.controller;
|
||||||
|
|
||||||
import java.net.URL;
|
import java.util.Random;
|
||||||
import java.util.ResourceBundle;
|
import java.util.ResourceBundle;
|
||||||
|
|
||||||
import javafx.fxml.FXML;
|
import effet.action.Action;
|
||||||
import javafx.fxml.Initializable;
|
import ihm.Die;
|
||||||
|
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.control.Label;
|
import javafx.scene.image.ImageView;
|
||||||
|
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 implements Initializable{
|
public class LancerDes {
|
||||||
@FXML private Label d6;
|
private int resultat;
|
||||||
@FXML private Label d4;
|
private Contexte contexte;
|
||||||
@FXML private Button btnStop;
|
private int typeDe;
|
||||||
@FXML private Button btnLancer;
|
private int[] rolls;
|
||||||
|
|
||||||
private int[] valeurD6 = {1, 2, 3, 4, 5, 6};
|
|
||||||
private int[] valeurD4 = {1, 2, 3, 4};
|
|
||||||
|
|
||||||
private int resultatD6;
|
|
||||||
private int resultatD4;
|
|
||||||
|
|
||||||
private boolean lancement = true;
|
|
||||||
|
|
||||||
@Override
|
private final static int LANCER_DE_4 = 0;
|
||||||
public void initialize(URL arg0, ResourceBundle arg1) {
|
private final static int LANCER_DE_6 = 1;
|
||||||
// TODO Auto-generated method stub
|
private final static int LANCER_DES = 2;
|
||||||
btnStop.setVisible(false);
|
public ResourceBundle bundle1 = ResourceBundle.getBundle("domaine.properties.langue", ParametreController.LaLangue);
|
||||||
|
public LancerDes(int typeDe, int[] rolls, Contexte c) {
|
||||||
btnLancer.setOnAction(e -> {
|
this.typeDe = typeDe;
|
||||||
try {
|
this.rolls = rolls;
|
||||||
btnLancer.setVisible(false);
|
this.contexte = c;
|
||||||
btnStop.setVisible(true);
|
|
||||||
lancement();
|
|
||||||
} catch (InterruptedException e1) {
|
|
||||||
e1.printStackTrace();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
btnStop.setOnAction(e -> {
|
|
||||||
//à remplir avec les valeurs donné par le gestionnaire de jeux
|
|
||||||
lancement = false;
|
|
||||||
d6.setText(Integer.toString(resultatD6));
|
|
||||||
d4.setText(Integer.toString(resultatD4));
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void lancement() throws InterruptedException {
|
private Button interpret(String s) {
|
||||||
/*int i=0;
|
|
||||||
while (lancement) {
|
String styles = "-fx-border-color: #e2e2e2;" + "-fx-border-width: 2;" + "-fx-background-radius: 0;"
|
||||||
d6.setText(Integer.toString(valeurD6[i%6]));
|
+ "-fx-background-color: #1d1d1d;" + "-fx-text-fill: #d8d8d8;"
|
||||||
d4.setText(Integer.toString(valeurD4[i%4]));
|
+ "-fx-background-insets: 0 0 0 0, 0, 1, 2;";
|
||||||
i++;
|
|
||||||
//Thread.sleep(500);
|
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);
|
||||||
|
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 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) {
|
||||||
|
DieImages images = new DieImages(6);
|
||||||
|
DieImages images2 = new DieImages(4);
|
||||||
|
Die die = new Die(images.getImages());
|
||||||
|
Die die2 = new Die(images2.getImages());
|
||||||
|
ImageView stackpane = die.getdieFace();
|
||||||
|
ImageView stackpane2 = die2.getdieFace();
|
||||||
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
43
src/ihm/controller/LieuZJ.java
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
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();
|
||||||
|
}
|
||||||
|
}
|
@ -3,7 +3,6 @@ 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;
|
||||||
@ -48,9 +47,6 @@ public class MenuController implements Initializable{
|
|||||||
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
|
||||||
@ -70,8 +66,12 @@ 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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
|
@ -14,6 +14,7 @@ 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;
|
||||||
|
|
||||||
@ -24,20 +25,30 @@ 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 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;
|
|
||||||
|
|
||||||
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 : https://www.youtube.com/watch?v=LBpKUIyOHdo
|
public static double slideValue;
|
||||||
InputStream fileMusique = getClass().getResourceAsStream("/ihm/ressources/musique/The_Red_Fox_Tavern.wav");
|
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
|
||||||
|
|
||||||
|
String filepathMusique = "/ihm/ressources/musique/The_Red_Fox_Tavern.wav"; // lien vers la musique :
|
||||||
|
// https://www.youtube.com/watch?v=LBpKUIyOHdo
|
||||||
|
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;
|
||||||
@ -46,126 +57,141 @@ public class ParametreController implements Initializable {
|
|||||||
@Override
|
@Override
|
||||||
public void initialize(URL arg0, ResourceBundle arg1) {
|
public void initialize(URL arg0, ResourceBundle arg1) {
|
||||||
|
|
||||||
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(tabLangues[1]);
|
||||||
|
langues.getItems().add(tabLangues[2]);
|
||||||
|
langues.getItems().add(tabLangues[3]);
|
||||||
|
|
||||||
langues.getItems().add("Anglais");
|
if (langueChoisi == null) {
|
||||||
langues.getItems().add("Allemand");
|
langues.setValue("Français");
|
||||||
langues.getItems().add("Espagnol");
|
} else {
|
||||||
langues.getItems().add("Français");
|
langues.setValue(langueChoisi);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
public void enregistre(MouseEvent mouseEvent) throws IOException, Exception {
|
public void enregistre(MouseEvent mouseEvent) throws IOException, Exception {
|
||||||
|
|
||||||
InputStream fileSound1 = getClass().getResourceAsStream("/ihm/ressources/musique/BEEP1.wav");
|
|
||||||
|
|
||||||
if(langues.getValue()=="Anglais") {
|
InputStream fileSound1 = getClass().getResourceAsStream("/ihm/ressources/musique/BEEP1.wav");
|
||||||
LaLangue=Locale.ENGLISH;
|
|
||||||
|
// 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()=="Français") {
|
else if (langues.getValue() == "Espagnol") {
|
||||||
LaLangue=Locale.FRANCE;
|
LaLangue = Locale.GERMAN;
|
||||||
|
langueChoisi = tabLangues[2];
|
||||||
}
|
}
|
||||||
//Pour la musique
|
else if (langues.getValue() == "Italien") {
|
||||||
if (fileMusique!=null) {
|
LaLangue = Locale.ITALIAN;
|
||||||
|
langueChoisi = tabLangues[1];
|
||||||
|
}
|
||||||
|
// Pour la musique
|
||||||
|
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) {
|
}
|
||||||
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 (Musique.musiqueEnCours != true) {
|
||||||
|
Musique.resumeMusique(Musique.clip);
|
||||||
|
Musique.musiqueEnCours = true;
|
||||||
|
Musique.setVolume(sliderMusique.getValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (cbMusiqueCoche == true) {
|
if (cbMusiqueCoche == true) {
|
||||||
cbMusiqueCoche = false;
|
cbMusiqueCoche = false;
|
||||||
Musique.pauseMusique(Musique.clip); //met en pause la musique
|
Musique.pauseMusique(Musique.clip); // met en pause la musique
|
||||||
Musique.musiqueEnCours = false;
|
Musique.musiqueEnCours = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//Pour les effets sonores
|
// Pour les effets sonores
|
||||||
if (cbEffetSonore.isSelected() == true) {
|
if (cbEffetSonore.isSelected() == true) {
|
||||||
EffetSonore.setSoundOK(true);
|
EffetSonore.setSoundOK(true);
|
||||||
cbSonCoche = true;
|
cbSonCoche = true;
|
||||||
|
|
||||||
System.out.println(EffetSonore.isSoundOK());
|
System.out.println(EffetSonore.isSoundOK());
|
||||||
}
|
}
|
||||||
|
|
||||||
else {
|
else {
|
||||||
EffetSonore.setSoundOK(false);
|
EffetSonore.setSoundOK(false);
|
||||||
cbSonCoche = false;
|
cbSonCoche = false;
|
||||||
System.out.println(EffetSonore.isSoundOK());
|
System.out.println(EffetSonore.isSoundOK());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Pour la couleur du theme
|
|
||||||
|
|
||||||
/*
|
// Quitter les paramètres
|
||||||
if (clair.isSelected()) {
|
EffetSonore.playSoundEffect(fileSound1); // emet un bruit sur le bouton si les effets sonores sont activés
|
||||||
//Pane root = FXMLLoader.load(getClass().getResource("../ressources/parametre.fxml"));
|
|
||||||
//root.setStyle("ressources/style/menuLight.css");
|
final URL fxmlURL = getClass().getResource("/ihm/ressources/Menu.fxml");
|
||||||
|
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue",
|
||||||
|
ParametreController.LaLangue);
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
// Quitter les paramètres
|
|
||||||
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);
|
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 monterVolume(MouseEvent mouseEvent) throws IOException{
|
public void slideVolumeMusique(MouseEvent mouseEvent) throws IOException {
|
||||||
Musique.volumeUp(5.f);
|
|
||||||
System.out.println("on monte le son");
|
if (Musique.musiqueEnCours == true) {
|
||||||
|
Musique.setVolume(sliderMusique.getValue());
|
||||||
|
slideValue = sliderMusique.getValue();
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
slideValue = sliderMusique.getValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@FXML
|
public void slideVolumeEffet(MouseEvent mouseEvent) throws IOException {
|
||||||
public void baisserVolume(MouseEvent mouseEvent) throws IOException{
|
|
||||||
Musique.volumeDown(5.f);
|
EffetSonore.setVolumeEffets(sliderEffets.getValue());
|
||||||
System.out.println("on baisse le son");
|
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"); }
|
||||||
|
*/
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -4,42 +4,54 @@ 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
|
||||||
@ -52,15 +64,22 @@ 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");
|
||||||
|
|
||||||
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;
|
||||||
} else if (MusiqueLancee ==false && Musique.musiqueEnCours != true) {
|
Musique.setVolume(sliderMusiquePause.getValue());
|
||||||
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) {
|
||||||
Musique.pauseMusique(Musique.clip); // met en pause la musique
|
Musique.pauseMusique(Musique.clip); // met en pause la musique
|
||||||
Musique.musiqueEnCours = false;
|
Musique.musiqueEnCours = false;
|
||||||
MusiqueLancee = false;
|
MusiqueLancee = false;
|
||||||
@ -82,7 +101,9 @@ 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
|
||||||
|
|
||||||
System.out.println("Retour au jeu");
|
System.out.println("Retour au jeu");
|
||||||
@ -96,35 +117,74 @@ 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);
|
|
||||||
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
|
|
||||||
AnchorPane root = fxmlLoader.load(); */
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
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 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);
|
||||||
|
AnchorPane pane = 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();
|
||||||
|
*/
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
@FXML
|
||||||
|
public void monterVolume(MouseEvent mouseEvent) throws IOException {
|
||||||
Musique.volumeUp(5.f);
|
Musique.volumeUp(5.f);
|
||||||
System.out.println("on monte le son");
|
System.out.println("on monte le son");
|
||||||
}
|
}
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
public void baisserVolume(MouseEvent mouseEvent) throws IOException{
|
public void baisserVolume(MouseEvent mouseEvent) throws IOException {
|
||||||
Musique.volumeDown(5.f);
|
Musique.volumeDown(5.f);
|
||||||
System.out.println("on baisse le son");
|
System.out.println("on baisse le son");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,17 +1,15 @@
|
|||||||
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;
|
||||||
@ -22,15 +20,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 = new TypeLumiere();
|
carte = CartePiochable.Type.LUMIERE;
|
||||||
});
|
});
|
||||||
|
|
||||||
vision.setOnAction(e -> {
|
vision.setOnAction(e -> {
|
||||||
carte = new TypeVision();
|
carte = CartePiochable.Type.VISION;
|
||||||
});
|
});
|
||||||
|
|
||||||
tenebre.setOnAction(e -> {
|
tenebre.setOnAction(e -> {
|
||||||
carte = new TypeTenebre();
|
carte = CartePiochable.Type.TENEBRE;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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", Locale.FRANCE);
|
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", ParametreController.LaLangue);
|
||||||
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
|
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
|
||||||
Pane pane = fxmlLoader.load();
|
Pane pane = fxmlLoader.load();
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
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;
|
||||||
@ -11,192 +12,191 @@ 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 private AnchorPane rootPane;
|
|
||||||
@FXML private GridPane gridPaneVie;
|
|
||||||
@FXML public GridPane gridPaneLieux;
|
|
||||||
|
|
||||||
|
@FXML
|
||||||
|
private AnchorPane rootPane;
|
||||||
|
@FXML
|
||||||
|
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;
|
||||||
|
private static Map<String, BufferedImage> mapRessourcesDosCartes;
|
||||||
|
|
||||||
|
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;
|
||||||
|
|
||||||
public static int DICE_SIX = 2;
|
|
||||||
public static int DICE_QUATRE = 1;
|
|
||||||
public static int DICE_BOTH = 0;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* initialise les données du plateau
|
* initialise les données du plateau
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
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++) {
|
||||||
|
|
||||||
Pane p = (Pane) gridPaneVie.getChildren().get(i);
|
Pane p = (Pane) gridPaneVie.getChildren().get(i);
|
||||||
Label l = (Label) p.getChildren().get(1);
|
Label l = (Label) p.getChildren().get(1);
|
||||||
l.setText(i+"");
|
l.setText(i + "");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
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),new Color(Math.random(), Math.random(), Math.random(),1),gridPaneVie, gridPaneLieux));
|
joueursIHM.add(new JoueurIHM(i, map.get(i), getPaneJoueur(i),
|
||||||
|
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();
|
||||||
// BUTTONS ETC
|
setMapRessourcesDosCartes(rl.getRessourceDosCartes());
|
||||||
//System.out.println(this.joueursPane);
|
|
||||||
|
List<CarteLieu> cl = gj.getCartesLieux();
|
||||||
/*
|
List<ImageView> ivs = this.getLieux();
|
||||||
this.hboxJoueur.add(joueur1);
|
|
||||||
this.hboxJoueur.add(joueur2);
|
applyImages(cl, ivs);
|
||||||
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) {
|
||||||
private Pane getPaneJoueur(int i) {
|
|
||||||
|
int size = cls.size();
|
||||||
System.out.println("i "+i);
|
if (cls.size() == ivs.size()) {
|
||||||
int position = i%8;
|
|
||||||
HBox hb = (HBox) rootPane.getChildren().get(0);
|
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) {
|
||||||
|
|
||||||
|
System.out.println("i " + i);
|
||||||
|
int position = i % 8;
|
||||||
|
HBox hb = (HBox) rootPane.getChildren().get(0);
|
||||||
GridPane gp = null;
|
GridPane gp = null;
|
||||||
|
|
||||||
// BAS
|
// BAS
|
||||||
if(position < 2) {
|
if (position < 2) {
|
||||||
VBox group = (VBox) hb.getChildren().get(1);
|
VBox group = (VBox) hb.getChildren().get(1);
|
||||||
gp = (GridPane) group.getChildren().get(2);
|
gp = (GridPane) group.getChildren().get(2);
|
||||||
|
|
||||||
//DROITE
|
// DROITE
|
||||||
}else if(position < 4) {
|
} else if (position < 4) {
|
||||||
System.out.println("Oui");
|
System.out.println("Oui");
|
||||||
Group group = (Group) hb.getChildren().get(2);
|
Group group = (Group) hb.getChildren().get(2);
|
||||||
gp = (GridPane) group.getChildren().get(0);
|
gp = (GridPane) group.getChildren().get(0);
|
||||||
|
|
||||||
//HAUT
|
// HAUT
|
||||||
}else if(position < 6) {
|
} else if (position < 6) {
|
||||||
|
|
||||||
VBox group = (VBox) hb.getChildren().get(1);
|
VBox group = (VBox) hb.getChildren().get(1);
|
||||||
gp = (GridPane) group.getChildren().get(0);
|
gp = (GridPane) group.getChildren().get(0);
|
||||||
|
|
||||||
//GAUCHE
|
// GAUCHE
|
||||||
}else if(position < 8) {
|
} else if (position < 8) {
|
||||||
Group group = (Group) hb.getChildren().get(0);
|
Group group = (Group) hb.getChildren().get(0);
|
||||||
gp = (GridPane) group.getChildren().get(0);
|
gp = (GridPane) group.getChildren().get(0);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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,29 +205,26 @@ 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", Locale.FRANCE);
|
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", ParametreController.LaLangue);
|
||||||
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, "Consulter sa carte");
|
PopUp popup = new PopUp(root, bundle.getString("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)) return joueurIHM;
|
if (joueurIHM.getJoueur().equals(j))
|
||||||
|
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
|
||||||
*
|
*
|
||||||
@ -236,18 +233,17 @@ 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", Locale.FRANCE);
|
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", ParametreController.LaLangue);
|
||||||
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();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Place les joueurs au bon endroit sur le plateau
|
* Place les joueurs au bon endroit sur le plateau
|
||||||
*
|
*
|
||||||
@ -255,28 +251,183 @@ public class PlateauController implements Initializable {
|
|||||||
*/
|
*/
|
||||||
public void placerJoueurs(Map<Integer, Joueur> j) {
|
public void placerJoueurs(Map<Integer, Joueur> j) {
|
||||||
Set<Integer> set = j.keySet();
|
Set<Integer> set = j.keySet();
|
||||||
|
|
||||||
for(int i = 0; i < 8; i++) {
|
for (int i = 0; i < 8; i++) {
|
||||||
if(!set.contains(i)) {
|
if (!set.contains(i)) {
|
||||||
getPaneJoueur(i).getChildren().setAll();
|
getPaneJoueur(i).getChildren().setAll();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void rollDice(Joueur joueur, int typeDice, int[] rolls) {
|
public void rollDice(Joueur joueur, int typeDice, int[] rolls, Contexte c) {
|
||||||
|
|
||||||
|
this.ld = new LancerDes(typeDice, rolls, c);
|
||||||
|
JoueurIHM jihm = getJoueurIHM(joueur);
|
||||||
|
jihm.setZoneJoueur(ld.initLancer(joueur));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void afficherChoisir(Joueur j) throws IOException {
|
public void afficherChoisir(Joueur j, Contexte contexte) 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();
|
|
||||||
JoueurIHM jihm = getJoueurIHM(j);
|
FinDePartieControlleur.listeWinner = listeJoueursGagnants;
|
||||||
jihm.setZoneJoueur(root);
|
//FinDePartieControlleur.listeImageCarte = listeImagesGagnant;
|
||||||
|
}
|
||||||
|
|
||||||
|
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) {
|
||||||
@ -287,31 +438,208 @@ 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();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
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
|
||||||
public void mettreEnPause(MouseEvent me) throws IOException {
|
public void mettreEnPause(MouseEvent me) throws IOException {
|
||||||
|
|
||||||
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("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", Locale.FRANCE);
|
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", ParametreController.LaLangue);
|
||||||
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, "Pause");
|
PopUp pu = new PopUp(root, bundle.getString("cacher.carte.vision"));
|
||||||
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);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -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", Locale.ENGLISH);
|
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", ParametreController.LaLangue);
|
||||||
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", Locale.ENGLISH);
|
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", ParametreController.LaLangue);
|
||||||
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, "Consulter sa carte");
|
PopUpBoolean popup = new PopUpBoolean(root, bundle.getString("consulter.sa.carte"));
|
||||||
return popup.display();
|
return popup.display();
|
||||||
|
|
||||||
|
|
||||||
|
@ -6,7 +6,6 @@ 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;
|
||||||
|
|
||||||
@ -19,7 +18,9 @@ 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;
|
||||||
@ -43,18 +44,48 @@ 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<EFBFBD>re chaque bouton textField et Checkebox a partir des hbox
|
* recupère chaque bouton textField et Checkebox à partir des hbox
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void initialize(URL arg0, ResourceBundle arg1) {
|
public void initialize(URL arg0, ResourceBundle arg1) {
|
||||||
@ -66,12 +97,44 @@ 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;
|
||||||
@ -83,6 +146,7 @@ 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;
|
||||||
@ -99,6 +163,9 @@ 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) {
|
||||||
@ -106,10 +173,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(), true));
|
joueurs.put(i, new Couple(tf.getText(), choixDifficulte(listeToggleRbIa.get(i))));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
joueurs.put(i, new Couple(tf.getText(), false));
|
joueurs.put(i, new Couple(tf.getText()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
i++;
|
i++;
|
||||||
@ -125,7 +192,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", Locale.FRENCH);
|
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 root = fxmlLoader.load();
|
AnchorPane root = fxmlLoader.load();
|
||||||
PlateauController pc = fxmlLoader.getController();
|
PlateauController pc = fxmlLoader.getController();
|
||||||
@ -141,13 +208,17 @@ 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("Il manque des joueurs pour lancer une partie.");
|
System.out.println(bundle.getString("manque.joueur"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -159,7 +230,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("Ajout du joueur " + (indice+1));
|
System.out.println(bundle.getString("ajout.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);
|
||||||
@ -170,12 +241,20 @@ 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) {
|
if (nbJoueursH + nbJoueursV >= 4 && memeNom()==false && textVide()==false) {
|
||||||
btnCommencer.setStyle("-fx-background-color: #1d1d1d; -fx-text-fill: #d8d8d8;");
|
btnCommencer.setStyle("-fx-background-color: #1d1d1d; -fx-text-fill: #d8d8d8;");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -186,7 +265,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("Desistement du joueur " + (indice+1));
|
System.out.println(bundle.getString("desistement") + (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);
|
||||||
@ -197,27 +276,111 @@ 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()) {
|
||||||
ajoutJoueur(indice);
|
|
||||||
txt.get(indice).setText("Joueur" + indice);
|
txt.get(indice).setText("Joueur" + indice);
|
||||||
|
|
||||||
|
ajoutJoueur(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", Locale.FRANCE);
|
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", ParametreController.LaLangue);
|
||||||
|
|
||||||
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
|
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
|
||||||
Pane pane = fxmlLoader.load();
|
Pane pane = fxmlLoader.load();
|
||||||
|
60
src/ihm/controller/RecevoirCarte.java
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
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();
|
||||||
|
}
|
||||||
|
}
|
@ -3,7 +3,6 @@ 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;
|
||||||
@ -12,11 +11,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 {
|
||||||
@ -25,8 +24,14 @@ 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) {
|
||||||
@ -34,6 +39,8 @@ public class ReglesControlleur implements Initializable {
|
|||||||
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);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -41,14 +48,18 @@ 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("Page suivante");
|
System.out.println(bundle.getString("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");
|
||||||
@ -61,14 +72,19 @@ 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");
|
|
||||||
} else {
|
System.out.println(bundle.getString("page.precedente"));
|
||||||
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");
|
||||||
@ -83,9 +99,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("Retour au Menu");
|
System.out.println(bundle.getString("retour.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", Locale.FRANCE);
|
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 pane = fxmlLoader.load();
|
||||||
Scene scene = new Scene(pane);
|
Scene scene = new Scene(pane);
|
||||||
@ -95,4 +111,17 @@ 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();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -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", Locale.FRENCH);
|
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", ParametreController.LaLangue);
|
||||||
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());
|
||||||
|
15
src/ihm/ressources/AlterationVieZJ.fxml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<?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>
|
54
src/ihm/ressources/Cartes_tenebres_riyuel_diabolique.fxml
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
<?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>
|
11
src/ihm/ressources/ChoisirAction.fxml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<?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>
|
@ -4,159 +4,245 @@
|
|||||||
<?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" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ihm.controller.PlayersController">
|
<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">
|
||||||
<children>
|
<children>
|
||||||
<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">
|
<BorderPane styleClass="background" 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>
|
||||||
<HBox fx:id="hb7" alignment="CENTER_RIGHT" prefHeight="67.0" prefWidth="340.0" rotate="90.0">
|
<VBox alignment="CENTER" prefHeight="688.0" prefWidth="214.0" rotate="180.0" spacing="150.0">
|
||||||
<children>
|
<children>
|
||||||
<TextField prefHeight="51.0" prefWidth="149.0">
|
<HBox alignment="CENTER_RIGHT" prefWidth="274.0" rotate="270.0">
|
||||||
<font>
|
<children>
|
||||||
<Font size="24.0" />
|
<VBox alignment="BOTTOM_CENTER" prefHeight="100.0" prefWidth="214.0">
|
||||||
</font>
|
<children>
|
||||||
</TextField>
|
<HBox fx:id="hbr8" alignment="CENTER" prefHeight="43.0" prefWidth="295.0">
|
||||||
<Button mnemonicParsing="false" prefHeight="55.0" prefWidth="45.0" styleClass="bouton" stylesheets="@style/menu.css" text="+">
|
<children>
|
||||||
<font>
|
<RadioButton mnemonicParsing="false" styleClass="titre" text="%ia.facile">
|
||||||
<Font size="24.0" />
|
<toggleGroup>
|
||||||
</font>
|
<ToggleGroup fx:id="tg8" />
|
||||||
<HBox.margin>
|
</toggleGroup>
|
||||||
<Insets left="10.0" right="10.0" />
|
</RadioButton>
|
||||||
</HBox.margin>
|
<RadioButton mnemonicParsing="false" selected="true" styleClass="titre" text="%ia.moyenne" toggleGroup="$tg8">
|
||||||
<padding>
|
<padding>
|
||||||
<Insets right="5.0" />
|
<Insets left="20.0" right="20.0" />
|
||||||
</padding>
|
</padding>
|
||||||
</Button>
|
</RadioButton>
|
||||||
<CheckBox mnemonicParsing="false">
|
<RadioButton mnemonicParsing="false" styleClass="titre" text="%ia.difficile" toggleGroup="$tg8" />
|
||||||
<font>
|
</children>
|
||||||
<Font size="24.0" />
|
</HBox>
|
||||||
</font>
|
<HBox fx:id="hb8" alignment="CENTER" prefHeight="100.0" prefWidth="200.0">
|
||||||
</CheckBox>
|
<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 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="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 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>
|
||||||
</children>
|
</children>
|
||||||
<VBox.margin>
|
</VBox>
|
||||||
<Insets bottom="150.0" left="-100.0" />
|
|
||||||
</VBox.margin>
|
|
||||||
</HBox>
|
|
||||||
<HBox fx:id="hb8" alignment="CENTER_LEFT" rotate="90.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 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 left="-100.0" top="200.0" />
|
|
||||||
</VBox.margin>
|
|
||||||
</HBox>
|
|
||||||
</children>
|
</children>
|
||||||
</VBox>
|
</VBox>
|
||||||
</left>
|
</left>
|
||||||
<right>
|
<right>
|
||||||
<VBox alignment="CENTER" prefHeight="688.0" prefWidth="248.0" BorderPane.alignment="CENTER">
|
<VBox alignment="CENTER" prefHeight="688.0" prefWidth="214.0" spacing="150.0" BorderPane.alignment="CENTER">
|
||||||
<children>
|
<children>
|
||||||
<HBox fx:id="hb4" alignment="CENTER_LEFT" prefHeight="100.0" prefWidth="200.0" rotate="270.0">
|
<HBox alignment="CENTER_RIGHT" prefWidth="274.0" rotate="270.0">
|
||||||
<children>
|
<children>
|
||||||
<TextField prefHeight="51.0" prefWidth="149.0">
|
<VBox alignment="BOTTOM_CENTER" prefHeight="100.0" prefWidth="214.0">
|
||||||
<font>
|
<children>
|
||||||
<Font size="24.0" />
|
<HBox fx:id="hbr4" alignment="CENTER" prefHeight="43.0" prefWidth="295.0">
|
||||||
</font>
|
<children>
|
||||||
</TextField>
|
<RadioButton mnemonicParsing="false" styleClass="titre" text="%ia.facile">
|
||||||
<Button mnemonicParsing="false" prefHeight="55.0" prefWidth="45.0" styleClass="bouton" stylesheets="@style/menu.css" text="+">
|
<toggleGroup>
|
||||||
<font>
|
<ToggleGroup fx:id="tg4" />
|
||||||
<Font size="24.0" />
|
</toggleGroup>
|
||||||
</font>
|
</RadioButton>
|
||||||
<HBox.margin>
|
<RadioButton mnemonicParsing="false" selected="true" styleClass="titre" text="%ia.moyenne" toggleGroup="$tg4">
|
||||||
<Insets left="10.0" right="10.0" />
|
<padding>
|
||||||
</HBox.margin>
|
<Insets left="20.0" right="20.0" />
|
||||||
<padding>
|
</padding>
|
||||||
<Insets right="5.0" />
|
</RadioButton>
|
||||||
</padding>
|
<RadioButton mnemonicParsing="false" styleClass="titre" text="%ia.difficile" toggleGroup="$tg4" />
|
||||||
</Button>
|
</children>
|
||||||
<CheckBox mnemonicParsing="false">
|
</HBox>
|
||||||
<font>
|
<HBox fx:id="hb4" alignment="CENTER" prefHeight="100.0" prefWidth="200.0">
|
||||||
<Font size="24.0" />
|
<children>
|
||||||
</font>
|
<TextField onKeyPressed="#couleurBtnCommencerJeu" onKeyReleased="#couleurBtnCommencerJeu" prefHeight="51.0" prefWidth="149.0">
|
||||||
</CheckBox>
|
<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>
|
</children>
|
||||||
<VBox.margin>
|
|
||||||
<Insets bottom="150.0" right="-100.0" />
|
|
||||||
</VBox.margin>
|
|
||||||
</HBox>
|
</HBox>
|
||||||
<HBox fx:id="hb3" alignment="CENTER_RIGHT" prefHeight="100.0" prefWidth="200.0" rotate="270.0">
|
<HBox alignment="CENTER_RIGHT" layoutX="10.0" layoutY="304.0" prefHeight="100.0" prefWidth="299.0" rotate="270.0">
|
||||||
<children>
|
<children>
|
||||||
<TextField prefHeight="51.0" prefWidth="149.0">
|
<VBox alignment="BOTTOM_CENTER" prefHeight="100.0" prefWidth="214.0">
|
||||||
<font>
|
<children>
|
||||||
<Font size="24.0" />
|
<HBox fx:id="hbr3" alignment="CENTER" prefHeight="43.0" prefWidth="295.0">
|
||||||
</font>
|
<children>
|
||||||
</TextField>
|
<RadioButton mnemonicParsing="false" styleClass="titre" text="%ia.facile">
|
||||||
<Button mnemonicParsing="false" prefHeight="55.0" prefWidth="45.0" styleClass="bouton" stylesheets="@style/menu.css" text="+">
|
<toggleGroup>
|
||||||
<font>
|
<ToggleGroup fx:id="tg3" />
|
||||||
<Font size="24.0" />
|
</toggleGroup>
|
||||||
</font>
|
</RadioButton>
|
||||||
<padding>
|
<RadioButton mnemonicParsing="false" selected="true" styleClass="titre" text="%ia.moyenne" toggleGroup="$tg3">
|
||||||
<Insets right="5.0" />
|
<padding>
|
||||||
</padding>
|
<Insets left="20.0" right="20.0" />
|
||||||
<HBox.margin>
|
</padding>
|
||||||
<Insets left="10.0" right="10.0" />
|
</RadioButton>
|
||||||
</HBox.margin>
|
<RadioButton mnemonicParsing="false" styleClass="titre" text="%ia.difficile" toggleGroup="$tg3" />
|
||||||
</Button>
|
</children>
|
||||||
<CheckBox mnemonicParsing="false">
|
</HBox>
|
||||||
<font>
|
<HBox fx:id="hb3" alignment="CENTER" prefHeight="100.0" prefWidth="200.0">
|
||||||
<Font size="24.0" />
|
<children>
|
||||||
</font>
|
<TextField onKeyPressed="#couleurBtnCommencerJeu" onKeyReleased="#couleurBtnCommencerJeu" prefHeight="51.0" prefWidth="149.0">
|
||||||
</CheckBox>
|
<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>
|
</children>
|
||||||
<VBox.margin>
|
|
||||||
<Insets right="-100.0" top="150.0" />
|
|
||||||
</VBox.margin>
|
|
||||||
</HBox>
|
</HBox>
|
||||||
</children>
|
</children>
|
||||||
</VBox>
|
</VBox>
|
||||||
</right>
|
</right>
|
||||||
<center>
|
<center>
|
||||||
<VBox alignment="CENTER" prefHeight="486.0" prefWidth="392.0" BorderPane.alignment="CENTER">
|
<VBox alignment="CENTER" prefHeight="486.0" prefWidth="553.0" BorderPane.alignment="CENTER">
|
||||||
<children>
|
<children>
|
||||||
<Label styleClass="titre" stylesheets="@style/menu.css" text="%entrez.nom.joueur">
|
<Label styleClass="titre" text="%entrez.nom.joueur">
|
||||||
<font>
|
<font>
|
||||||
<Font size="48.0" />
|
<Font size="48.0" />
|
||||||
</font>
|
</font>
|
||||||
</Label>
|
</Label>
|
||||||
<Label styleClass="titre" stylesheets="@style/menu.css" text="%nombre.joueur.minimum">
|
<Label styleClass="titre" text="%nombre.joueur.minimum">
|
||||||
<font>
|
<font>
|
||||||
<Font size="36.0" />
|
<Font size="36.0" />
|
||||||
</font>
|
</font>
|
||||||
</Label>
|
</Label>
|
||||||
<Label styleClass="titre" stylesheets="@style/menu.css" text="%cocher.case">
|
<Label styleClass="titre" 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" stylesheets="@style/menu.css" text="%commencer.partie">
|
<Button fx:id="btnCommencer" mnemonicParsing="false" onMouseClicked="#commencerJeux" styleClass="bouton" text="%commencer.partie">
|
||||||
<font>
|
<font>
|
||||||
<Font size="24.0" />
|
<Font size="24.0" />
|
||||||
</font>
|
</font>
|
||||||
@ -164,7 +250,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" stylesheets="@style/menu.css" text="retour">
|
<Button layoutX="283.0" layoutY="379.0" mnemonicParsing="false" onMouseClicked="#retour" prefHeight="55.0" prefWidth="247.0" styleClass="bouton" text="%retour">
|
||||||
<font>
|
<font>
|
||||||
<Font size="24.0" />
|
<Font size="24.0" />
|
||||||
</font>
|
</font>
|
||||||
@ -178,114 +264,199 @@
|
|||||||
<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>
|
||||||
<HBox fx:id="hb6" alignment="CENTER" rotate="180.0">
|
<VBox alignment="CENTER" prefHeight="110.0" prefWidth="559.0" spacing="10.0">
|
||||||
<children>
|
<children>
|
||||||
<TextField>
|
<HBox fx:id="hb6" alignment="CENTER" prefWidth="754.0" rotate="180.0">
|
||||||
<font>
|
<children>
|
||||||
<Font size="24.0" />
|
<TextField onKeyPressed="#couleurBtnCommencerJeu" onKeyReleased="#couleurBtnCommencerJeu">
|
||||||
</font>
|
<font>
|
||||||
</TextField>
|
<Font size="24.0" />
|
||||||
<Button mnemonicParsing="false" prefHeight="55.0" prefWidth="55.0" styleClass="bouton" stylesheets="@style/menu.css" text="+">
|
</font>
|
||||||
<font>
|
</TextField>
|
||||||
<Font size="24.0" />
|
<Button mnemonicParsing="false" prefHeight="55.0" prefWidth="55.0" styleClass="bouton" text="+">
|
||||||
</font>
|
<font>
|
||||||
<HBox.margin>
|
<Font size="24.0" />
|
||||||
<Insets left="10.0" right="10.0" />
|
</font>
|
||||||
</HBox.margin>
|
<HBox.margin>
|
||||||
</Button>
|
<Insets left="10.0" right="10.0" />
|
||||||
<CheckBox mnemonicParsing="false">
|
</HBox.margin>
|
||||||
<font>
|
</Button>
|
||||||
<Font size="24.0" />
|
<CheckBox mnemonicParsing="false">
|
||||||
</font>
|
<font>
|
||||||
</CheckBox>
|
<Font size="24.0" />
|
||||||
|
</font>
|
||||||
|
</CheckBox>
|
||||||
|
</children>
|
||||||
|
</HBox>
|
||||||
|
<HBox fx:id="hbr6" alignment="CENTER" prefHeight="20.0" prefWidth="762.0">
|
||||||
|
<children>
|
||||||
|
<RadioButton contentDisplay="CENTER" mnemonicParsing="false" rotate="180.0" styleClass="titre" text="%ia.difficile">
|
||||||
|
<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>
|
</children>
|
||||||
</HBox>
|
</VBox>
|
||||||
<HBox fx:id="hb5" alignment="CENTER" rotate="180.0">
|
<VBox alignment="CENTER" spacing="10.0">
|
||||||
<children>
|
<children>
|
||||||
<TextField accessibleRole="PARENT">
|
<HBox fx:id="hb5" alignment="CENTER" prefHeight="55.0" prefWidth="537.0" rotate="180.0">
|
||||||
<font>
|
<children>
|
||||||
<Font size="24.0" />
|
<TextField accessibleRole="PARENT" onKeyPressed="#couleurBtnCommencerJeu" onKeyReleased="#couleurBtnCommencerJeu">
|
||||||
</font>
|
<font>
|
||||||
<HBox.margin>
|
<Font size="24.0" />
|
||||||
<Insets />
|
</font>
|
||||||
</HBox.margin>
|
<HBox.margin>
|
||||||
</TextField>
|
<Insets />
|
||||||
<Button mnemonicParsing="false" prefHeight="55.0" prefWidth="55.0" styleClass="bouton" stylesheets="@style/menu.css" text="+">
|
</HBox.margin>
|
||||||
<font>
|
</TextField>
|
||||||
<Font size="24.0" />
|
<Button mnemonicParsing="false" prefHeight="55.0" prefWidth="55.0" styleClass="bouton" text="+">
|
||||||
</font>
|
<font>
|
||||||
<HBox.margin>
|
<Font size="24.0" />
|
||||||
<Insets left="10.0" right="10.0" />
|
</font>
|
||||||
</HBox.margin>
|
<HBox.margin>
|
||||||
</Button>
|
<Insets left="10.0" right="10.0" />
|
||||||
<CheckBox mnemonicParsing="false">
|
</HBox.margin>
|
||||||
<font>
|
</Button>
|
||||||
<Font size="24.0" />
|
<CheckBox mnemonicParsing="false">
|
||||||
</font>
|
<font>
|
||||||
</CheckBox>
|
<Font size="24.0" />
|
||||||
|
</font>
|
||||||
|
</CheckBox>
|
||||||
|
</children>
|
||||||
|
</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>
|
</children>
|
||||||
<HBox.margin>
|
</VBox>
|
||||||
<Insets left="30.0" />
|
|
||||||
</HBox.margin>
|
|
||||||
</HBox>
|
|
||||||
</children>
|
</children>
|
||||||
</HBox>
|
</HBox>
|
||||||
</top>
|
</top>
|
||||||
<bottom>
|
<bottom>
|
||||||
<VBox alignment="CENTER" prefHeight="94.0" prefWidth="1280.0" BorderPane.alignment="CENTER">
|
<VBox alignment="CENTER" prefHeight="0.0" prefWidth="902.0" BorderPane.alignment="CENTER">
|
||||||
<children>
|
<children>
|
||||||
<HBox alignment="CENTER" prefHeight="100.0" prefWidth="200.0">
|
<HBox alignment="CENTER" prefHeight="129.0" prefWidth="1280.0">
|
||||||
<children>
|
<children>
|
||||||
<HBox fx:id="hb1" alignment="CENTER">
|
<VBox alignment="CENTER" prefHeight="70.0" prefWidth="1338.0" spacing="20.0">
|
||||||
<children>
|
<children>
|
||||||
<TextField prefHeight="51.0" prefWidth="298.0">
|
<HBox fx:id="hbr1" alignment="CENTER" prefHeight="43.0" prefWidth="688.0">
|
||||||
<font>
|
<children>
|
||||||
<Font size="24.0" />
|
<RadioButton mnemonicParsing="false" styleClass="titre" text="%ia.facile">
|
||||||
</font>
|
<opaqueInsets>
|
||||||
</TextField>
|
<Insets />
|
||||||
<Button mnemonicParsing="false" prefHeight="55.0" prefWidth="55.0" styleClass="bouton" stylesheets="@style/menu.css" text="+">
|
</opaqueInsets>
|
||||||
<font>
|
<toggleGroup>
|
||||||
<Font size="24.0" />
|
<ToggleGroup fx:id="tg1" />
|
||||||
</font>
|
</toggleGroup></RadioButton>
|
||||||
<HBox.margin>
|
<RadioButton mnemonicParsing="false" selected="true" styleClass="titre" text="%ia.moyenne" toggleGroup="$tg1">
|
||||||
<Insets left="10.0" right="10.0" />
|
<padding>
|
||||||
</HBox.margin>
|
<Insets left="20.0" right="20.0" />
|
||||||
</Button>
|
</padding></RadioButton>
|
||||||
<CheckBox mnemonicParsing="false">
|
<RadioButton mnemonicParsing="false" styleClass="titre" text="%ia.difficile" toggleGroup="$tg1" />
|
||||||
<font>
|
</children>
|
||||||
<Font size="24.0" />
|
<padding>
|
||||||
</font>
|
<Insets bottom="-5.0" />
|
||||||
</CheckBox>
|
</padding>
|
||||||
|
</HBox>
|
||||||
|
<HBox fx:id="hb1" alignment="CENTER">
|
||||||
|
<children>
|
||||||
|
<TextField onKeyPressed="#couleurBtnCommencerJeu" onKeyReleased="#couleurBtnCommencerJeu" prefHeight="51.0" prefWidth="298.0">
|
||||||
|
<font>
|
||||||
|
<Font size="24.0" />
|
||||||
|
</font>
|
||||||
|
</TextField>
|
||||||
|
<Button mnemonicParsing="false" prefHeight="55.0" prefWidth="55.0" styleClass="bouton" text="+">
|
||||||
|
<font>
|
||||||
|
<Font size="24.0" />
|
||||||
|
</font>
|
||||||
|
<HBox.margin>
|
||||||
|
<Insets left="10.0" right="10.0" />
|
||||||
|
</HBox.margin>
|
||||||
|
</Button>
|
||||||
|
<CheckBox mnemonicParsing="false">
|
||||||
|
<font>
|
||||||
|
<Font size="24.0" />
|
||||||
|
</font>
|
||||||
|
</CheckBox>
|
||||||
|
</children>
|
||||||
|
<padding>
|
||||||
|
<Insets bottom="10.0" top="-3.0" />
|
||||||
|
</padding>
|
||||||
|
</HBox>
|
||||||
</children>
|
</children>
|
||||||
</HBox>
|
<opaqueInsets>
|
||||||
<HBox fx:id="hb2" alignment="CENTER">
|
<Insets />
|
||||||
|
</opaqueInsets>
|
||||||
|
</VBox>
|
||||||
|
<VBox alignment="CENTER" prefHeight="70.0" prefWidth="1213.0">
|
||||||
<children>
|
<children>
|
||||||
<TextField>
|
<HBox fx:id="hbr2" alignment="CENTER" prefHeight="43.0" prefWidth="688.0">
|
||||||
<font>
|
<children>
|
||||||
<Font size="24.0" />
|
<RadioButton mnemonicParsing="false" styleClass="titre" text="%ia.facile">
|
||||||
</font>
|
<toggleGroup>
|
||||||
</TextField>
|
<ToggleGroup fx:id="tg2" />
|
||||||
<Button mnemonicParsing="false" prefHeight="55.0" prefWidth="55.0" styleClass="bouton" stylesheets="@style/menu.css" text="+">
|
</toggleGroup>
|
||||||
<font>
|
</RadioButton>
|
||||||
<Font size="24.0" />
|
<RadioButton mnemonicParsing="false" selected="true" styleClass="titre" text="%ia.moyenne" toggleGroup="$tg2">
|
||||||
</font>
|
<padding>
|
||||||
<HBox.margin>
|
<Insets left="20.0" right="20.0" />
|
||||||
<Insets left="10.0" right="10.0" />
|
</padding>
|
||||||
</HBox.margin>
|
</RadioButton>
|
||||||
</Button>
|
<RadioButton mnemonicParsing="false" styleClass="titre" text="%ia.difficile" toggleGroup="$tg2" />
|
||||||
<CheckBox mnemonicParsing="false">
|
</children>
|
||||||
<font>
|
<padding>
|
||||||
<Font size="24.0" />
|
<Insets bottom="10.0" />
|
||||||
</font>
|
</padding>
|
||||||
</CheckBox>
|
</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 size="24.0" />
|
||||||
|
</font>
|
||||||
|
</TextField>
|
||||||
|
<Button mnemonicParsing="false" prefHeight="55.0" prefWidth="55.0" styleClass="bouton" text="+">
|
||||||
|
<font>
|
||||||
|
<Font size="24.0" />
|
||||||
|
</font>
|
||||||
|
<HBox.margin>
|
||||||
|
<Insets left="10.0" right="10.0" />
|
||||||
|
</HBox.margin>
|
||||||
|
</Button>
|
||||||
|
<CheckBox mnemonicParsing="false">
|
||||||
|
<font>
|
||||||
|
<Font size="24.0" />
|
||||||
|
</font>
|
||||||
|
</CheckBox>
|
||||||
|
</children>
|
||||||
|
<padding>
|
||||||
|
<Insets bottom="10.0" />
|
||||||
|
</padding>
|
||||||
|
</HBox>
|
||||||
</children>
|
</children>
|
||||||
<HBox.margin>
|
</VBox>
|
||||||
<Insets left="30.0" />
|
|
||||||
</HBox.margin>
|
|
||||||
</HBox>
|
|
||||||
</children>
|
</children>
|
||||||
</HBox>
|
</HBox>
|
||||||
</children>
|
</children>
|
||||||
|
<opaqueInsets>
|
||||||
|
<Insets />
|
||||||
|
</opaqueInsets>
|
||||||
</VBox>
|
</VBox>
|
||||||
</bottom>
|
</bottom>
|
||||||
</BorderPane>
|
</BorderPane>
|
||||||
|
42
src/ihm/ressources/Fin_De_Partie.fxml
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
<?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>
|
99
src/ihm/ressources/Jouer_son_tour_donner_vision.fxml
Normal file
@ -0,0 +1,99 @@
|
|||||||
|
<?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>
|
51
src/ihm/ressources/Jouer_son_tour_piocher_lum_et_ten.fxml
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
<?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>
|
46
src/ihm/ressources/Jouer_son_tour_piocher_vision.fxml
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
<?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>
|
36
src/ihm/ressources/Jouer_son_tour_recevoir_blessure.fxml
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
<?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>
|
20
src/ihm/ressources/Jouer_son_tour_vision_inefficace.fxml
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
<?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>
|
@ -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>
|
||||||
|
@ -1,54 +1,26 @@
|
|||||||
<?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.ColumnConstraints?>
|
<?import javafx.scene.layout.HBox?>
|
||||||
<?import javafx.scene.layout.GridPane?>
|
<?import javafx.scene.layout.VBox?>
|
||||||
<?import javafx.scene.layout.Pane?>
|
|
||||||
<?import javafx.scene.layout.RowConstraints?>
|
|
||||||
|
|
||||||
<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">
|
<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">
|
||||||
<children>
|
<children>
|
||||||
<Pane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="180.0" prefWidth="255.0" stylesheets="@style/popUp.css">
|
<VBox alignment="CENTER" spacing="10.0" styleClass="background" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
||||||
<children>
|
<children>
|
||||||
<Label layoutX="58.0" layoutY="14.0" text="%voler.equipement.joueur" />
|
<Label alignment="CENTER" contentDisplay="CENTER" styleClass="text" text="%voler.equipement.joueur" />
|
||||||
<ScrollPane layoutX="28.0" layoutY="38.0" prefHeight="128.0" prefWidth="200.0">
|
<ScrollPane fx:id="scrollpane" fitToHeight="true" fitToWidth="true" prefHeight="144.0" prefWidth="144.0" vbarPolicy="NEVER" VBox.vgrow="SOMETIMES">
|
||||||
<content>
|
<content>
|
||||||
<GridPane fx:id="grilleEquipement">
|
<HBox fx:id="hbox" styleClass="background" />
|
||||||
<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>
|
||||||
</Pane>
|
<padding>
|
||||||
|
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
|
||||||
|
</padding>
|
||||||
|
</VBox>
|
||||||
</children>
|
</children>
|
||||||
</AnchorPane>
|
</AnchorPane>
|
||||||
|
@ -78,7 +78,7 @@
|
|||||||
</Button>
|
</Button>
|
||||||
</children>
|
</children>
|
||||||
</HBox>
|
</HBox>
|
||||||
<Label fx:id="titre" layoutX="9.0" layoutY="82.0" text="Choisir un joueur à qui donner la carte vision" />
|
<Label fx:id="titre" layoutX="9.0" layoutY="82.0" text="%choisir.jouer.a.qui.donner.vision" />
|
||||||
</children>
|
</children>
|
||||||
</Pane>
|
</Pane>
|
||||||
</children>
|
</children>
|
||||||
|
@ -6,12 +6,11 @@
|
|||||||
<?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="Il ne se passe rien." textAlignment="CENTER" />
|
<Label contentDisplay="CENTER" layoutX="77.0" layoutY="90.0" prefHeight="27.0" prefWidth="102.0" text="%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" />
|
||||||
|
@ -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>
|
||||||
|
@ -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 attaquer" />
|
<Button fx:id="nonButton" layoutX="136.0" layoutY="128.0" mnemonicParsing="false" text="%ne.pas.attaqur" />
|
||||||
<Label fx:id="titre" layoutX="40.0" layoutY="31.0" text="Voulez-vous attaquer un joueur ?" />
|
<Label fx:id="titre" layoutX="40.0" layoutY="31.0" text="%voulez.vous.attaquer.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>
|
||||||
|
@ -78,7 +78,7 @@
|
|||||||
</Button>
|
</Button>
|
||||||
</children>
|
</children>
|
||||||
</HBox>
|
</HBox>
|
||||||
<Label fx:id="titre" layoutX="50.0" layoutY="82.0" text="Choisir un joueur à attaquer !" />
|
<Label fx:id="titre" layoutX="50.0" layoutY="82.0" text="%choisir.joueur.attaquer" />
|
||||||
</children>
|
</children>
|
||||||
</Pane>
|
</Pane>
|
||||||
</children>
|
</children>
|
||||||
|
@ -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" />
|
<Button fx:id="btnStop" layoutX="105.0" layoutY="144.0" mnemonicParsing="false" text="%stop" underline="true" />
|
||||||
</children>
|
</children>
|
||||||
</Pane>
|
</Pane>
|
||||||
</children>
|
</children>
|
||||||
|
37
src/ihm/ressources/LieuZJ.fxml
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
<?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>
|
@ -21,7 +21,7 @@
|
|||||||
<Font size="24.0" />
|
<Font size="24.0" />
|
||||||
</font>
|
</font>
|
||||||
</Button>
|
</Button>
|
||||||
<Button mnemonicParsing="false" onMouseClicked="#ouvrirParametres" styleClass="bouton" text="Paramètres">
|
<Button mnemonicParsing="false" onMouseClicked="#ouvrirParametres" styleClass="bouton" text="%parametre">
|
||||||
<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>
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
<?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?>
|
||||||
@ -13,113 +14,124 @@
|
|||||||
<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>
|
||||||
<VBox>
|
<HBox prefHeight="100.0" prefWidth="200.0">
|
||||||
<children>
|
<children>
|
||||||
<Label style="-fx-border-width: 0 0 0.5 0; -fx-border-color: #e2e2e2;" text="Sons">
|
<VBox prefHeight="322.0" prefWidth="315.0">
|
||||||
<font>
|
|
||||||
<Font size="18.0" />
|
|
||||||
</font>
|
|
||||||
</Label>
|
|
||||||
<HBox alignment="CENTER_LEFT">
|
|
||||||
<children>
|
<children>
|
||||||
<Label text="Musique">
|
<Label style="-fx-border-width: 0 0 0.5 0; -fx-border-color: #e2e2e2;" text="%sons">
|
||||||
<HBox.margin>
|
|
||||||
<Insets right="300.0" />
|
|
||||||
</HBox.margin>
|
|
||||||
<font>
|
<font>
|
||||||
<Font size="14.0" />
|
<Font size="18.0" />
|
||||||
</font>
|
</font>
|
||||||
</Label>
|
</Label>
|
||||||
<CheckBox fx:id="cbMusique" mnemonicParsing="false">
|
<HBox alignment="CENTER_LEFT">
|
||||||
<HBox.margin>
|
<children>
|
||||||
|
<Label text="%musique">
|
||||||
|
<HBox.margin>
|
||||||
|
<Insets />
|
||||||
|
</HBox.margin>
|
||||||
|
<font>
|
||||||
|
<Font size="14.0" />
|
||||||
|
</font>
|
||||||
|
</Label>
|
||||||
|
</children>
|
||||||
|
<VBox.margin>
|
||||||
<Insets bottom="5.0" />
|
<Insets bottom="5.0" />
|
||||||
</HBox.margin>
|
</VBox.margin>
|
||||||
</CheckBox>
|
</HBox>
|
||||||
</children>
|
<HBox>
|
||||||
<VBox.margin>
|
<children>
|
||||||
<Insets bottom="5.0" />
|
<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" />
|
||||||
</VBox.margin>
|
</children>
|
||||||
</HBox>
|
</HBox>
|
||||||
<HBox prefHeight="38.0" prefWidth="337.0">
|
<Label prefHeight="18.0" prefWidth="198.0" styleClass="text" stylesheets="@style/plateau.css" text="The Red Fox Tavern - Curran Son">
|
||||||
<children>
|
<opaqueInsets>
|
||||||
<Button mnemonicParsing="false" onMouseClicked="#monterVolume" text="Volume +">
|
<Insets />
|
||||||
|
</opaqueInsets>
|
||||||
|
<padding>
|
||||||
|
<Insets bottom="20.0" left="5.0" />
|
||||||
|
</padding>
|
||||||
|
</Label>
|
||||||
|
<HBox alignment="CENTER_LEFT">
|
||||||
|
<children>
|
||||||
|
<Label text="%effet">
|
||||||
|
<HBox.margin>
|
||||||
|
<Insets />
|
||||||
|
</HBox.margin>
|
||||||
|
<font>
|
||||||
|
<Font size="14.0" />
|
||||||
|
</font>
|
||||||
|
</Label>
|
||||||
|
</children>
|
||||||
|
</HBox>
|
||||||
|
<HBox prefHeight="0.0" prefWidth="540.0">
|
||||||
|
<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>
|
||||||
<Font size="14.0" />
|
<Font size="14.0" />
|
||||||
</font>
|
</font>
|
||||||
<HBox.margin>
|
<VBox.margin>
|
||||||
<Insets right="10.0" />
|
<Insets top="30.0" />
|
||||||
</HBox.margin>
|
</VBox.margin>
|
||||||
</Button>
|
</Button>
|
||||||
<Button mnemonicParsing="false" onMouseClicked="#baisserVolume" text="Volume -">
|
<Label style="-fx-border-width: 0 0 0.5 0; -fx-border-color: #e2e2e2;" text="%jeux">
|
||||||
|
<VBox.margin>
|
||||||
|
<Insets top="50.0" />
|
||||||
|
</VBox.margin>
|
||||||
<font>
|
<font>
|
||||||
<Font size="14.0" />
|
<Font size="18.0" />
|
||||||
</font>
|
</font>
|
||||||
<HBox.margin>
|
</Label>
|
||||||
<Insets left="10.0" />
|
<HBox>
|
||||||
</HBox.margin>
|
<VBox.margin>
|
||||||
</Button>
|
<Insets top="5.0" />
|
||||||
|
</VBox.margin>
|
||||||
|
<children>
|
||||||
|
<Button mnemonicParsing="false" onMouseClicked="#reprendre" text="%reprendre.partie">
|
||||||
|
<HBox.margin>
|
||||||
|
<Insets right="25.0" />
|
||||||
|
</HBox.margin>
|
||||||
|
<font>
|
||||||
|
<Font size="14.0" />
|
||||||
|
</font>
|
||||||
|
</Button>
|
||||||
|
</children>
|
||||||
|
</HBox>
|
||||||
</children>
|
</children>
|
||||||
<padding>
|
<padding>
|
||||||
<Insets bottom="10.0" top="10.0" />
|
<Insets left="100.0" />
|
||||||
</padding>
|
</padding>
|
||||||
</HBox>
|
</VBox>
|
||||||
<HBox alignment="CENTER_LEFT">
|
<VBox prefHeight="325.0" prefWidth="199.0">
|
||||||
<children>
|
<children>
|
||||||
<Label text="Effet sonores">
|
<CheckBox fx:id="cbMusique" mnemonicParsing="false">
|
||||||
<HBox.margin>
|
<VBox.margin>
|
||||||
<Insets right="273.0" />
|
<Insets bottom="50.0" top="30.0" />
|
||||||
</HBox.margin>
|
</VBox.margin>
|
||||||
<font>
|
</CheckBox>
|
||||||
<Font size="14.0" />
|
<CheckBox fx:id="cbEffet" alignment="CENTER" mnemonicParsing="false" />
|
||||||
</font>
|
<Button mnemonicParsing="false" onMouseClicked="#quitter" style="-fx-text-fill: red;" text="%quitter.jeu">
|
||||||
</Label>
|
|
||||||
<CheckBox fx:id="cbEffet" mnemonicParsing="false" />
|
|
||||||
</children>
|
|
||||||
</HBox>
|
|
||||||
<Label style="-fx-border-width: 0 0 0.5 0; -fx-border-color: #e2e2e2;" text="Jeux">
|
|
||||||
<VBox.margin>
|
|
||||||
<Insets top="50.0" />
|
|
||||||
</VBox.margin>
|
|
||||||
<font>
|
|
||||||
<Font size="18.0" />
|
|
||||||
</font>
|
|
||||||
</Label>
|
|
||||||
<HBox>
|
|
||||||
<VBox.margin>
|
|
||||||
<Insets top="5.0" />
|
|
||||||
</VBox.margin>
|
|
||||||
<children>
|
|
||||||
<Button mnemonicParsing="false" onMouseClicked="#reprendre" text="Reprendre la partie">
|
|
||||||
<HBox.margin>
|
|
||||||
<Insets right="25.0" />
|
|
||||||
</HBox.margin>
|
|
||||||
<font>
|
|
||||||
<Font size="14.0" />
|
|
||||||
</font>
|
|
||||||
</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>
|
||||||
<Font size="14.0" />
|
<Font size="14.0" />
|
||||||
</font>
|
</font>
|
||||||
|
<VBox.margin>
|
||||||
|
<Insets top="171.0" />
|
||||||
|
</VBox.margin>
|
||||||
</Button>
|
</Button>
|
||||||
</children>
|
</children>
|
||||||
</HBox>
|
<HBox.margin>
|
||||||
|
<Insets />
|
||||||
|
</HBox.margin>
|
||||||
|
</VBox>
|
||||||
</children>
|
</children>
|
||||||
<VBox.margin>
|
</HBox>
|
||||||
<Insets top="50.0" />
|
|
||||||
</VBox.margin>
|
|
||||||
<padding>
|
|
||||||
<Insets left="100.0" />
|
|
||||||
</padding>
|
|
||||||
</VBox>
|
|
||||||
</children>
|
</children>
|
||||||
</VBox>
|
</VBox>
|
||||||
</children>
|
</children>
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
<?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?>
|
||||||
@ -15,16 +16,15 @@
|
|||||||
<?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" 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">
|
<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">
|
||||||
<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" prefWidth="885.0" rotate="90.0">
|
<GridPane hgap="50.0" rotate="90.0">
|
||||||
<columnConstraints>
|
<columnConstraints>
|
||||||
<ColumnConstraints hgrow="ALWAYS" />
|
<ColumnConstraints hgrow="ALWAYS" />
|
||||||
<ColumnConstraints hgrow="ALWAYS" />
|
<ColumnConstraints hgrow="ALWAYS" />
|
||||||
@ -63,13 +63,23 @@
|
|||||||
<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>
|
||||||
<FlowPane prefWidth="144.0" styleClass="tour" GridPane.columnIndex="2" GridPane.rowIndex="1">
|
<ScrollPane fitToHeight="true" fitToWidth="true" hbarPolicy="NEVER" prefHeight="144.0" prefWidth="144.0" styleClass="pane" vbarPolicy="NEVER" GridPane.columnIndex="2" GridPane.rowIndex="1">
|
||||||
<children>
|
<content>
|
||||||
<ImageView pickOnBounds="true" preserveRatio="true" />
|
<AnchorPane>
|
||||||
</children>
|
<children>
|
||||||
</FlowPane>
|
<HBox styleClass="background" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0" />
|
||||||
<Label styleClass="text" stylesheets="@style/plateau.css" text="Equipements" GridPane.columnIndex="2" />
|
</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>
|
</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>
|
||||||
@ -101,13 +111,23 @@
|
|||||||
<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>
|
||||||
<FlowPane prefHeight="144.0" prefWidth="144.0" styleClass="tour" GridPane.columnIndex="2" GridPane.rowIndex="1">
|
<ScrollPane fitToHeight="true" fitToWidth="true" hbarPolicy="NEVER" prefHeight="144.0" prefWidth="144.0" styleClass="pane" vbarPolicy="NEVER" GridPane.columnIndex="2" GridPane.rowIndex="1">
|
||||||
<children>
|
<content>
|
||||||
<ImageView pickOnBounds="true" preserveRatio="true" />
|
<AnchorPane>
|
||||||
</children>
|
<children>
|
||||||
</FlowPane>
|
<HBox styleClass="background" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0" />
|
||||||
<Label styleClass="text" stylesheets="@style/plateau.css" text="Equipements" GridPane.columnIndex="2" />
|
</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>
|
</children>
|
||||||
|
<padding>
|
||||||
|
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
|
||||||
|
</padding>
|
||||||
</GridPane>
|
</GridPane>
|
||||||
</children>
|
</children>
|
||||||
<padding>
|
<padding>
|
||||||
@ -121,13 +141,13 @@
|
|||||||
</Group>
|
</Group>
|
||||||
<VBox alignment="CENTER" spacing="100.0">
|
<VBox alignment="CENTER" spacing="100.0">
|
||||||
<children>
|
<children>
|
||||||
<GridPane hgap="50.0" rotate="180.0">
|
<GridPane hgap="50.0" rotate="180.0" VBox.vgrow="ALWAYS">
|
||||||
<columnConstraints>
|
<columnConstraints>
|
||||||
<ColumnConstraints hgrow="ALWAYS" />
|
<ColumnConstraints hgrow="ALWAYS" />
|
||||||
<ColumnConstraints hgrow="ALWAYS" />
|
<ColumnConstraints hgrow="ALWAYS" />
|
||||||
</columnConstraints>
|
</columnConstraints>
|
||||||
<rowConstraints>
|
<rowConstraints>
|
||||||
<RowConstraints minHeight="10.0" vgrow="SOMETIMES" />
|
<RowConstraints vgrow="ALWAYS" />
|
||||||
</rowConstraints>
|
</rowConstraints>
|
||||||
<children>
|
<children>
|
||||||
<GridPane nodeOrientation="LEFT_TO_RIGHT">
|
<GridPane nodeOrientation="LEFT_TO_RIGHT">
|
||||||
@ -160,13 +180,23 @@
|
|||||||
<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>
|
||||||
<FlowPane prefWidth="144.0" styleClass="tour" GridPane.columnIndex="2" GridPane.rowIndex="1">
|
<ScrollPane fitToHeight="true" fitToWidth="true" hbarPolicy="NEVER" prefHeight="144.0" prefWidth="144.0" styleClass="pane" vbarPolicy="NEVER" GridPane.columnIndex="2" GridPane.rowIndex="1">
|
||||||
<children>
|
<content>
|
||||||
<ImageView pickOnBounds="true" preserveRatio="true" />
|
<AnchorPane>
|
||||||
</children>
|
<children>
|
||||||
</FlowPane>
|
<HBox styleClass="background" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0" />
|
||||||
<Label styleClass="text" stylesheets="@style/plateau.css" text="Equipements" GridPane.columnIndex="2" />
|
</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>
|
</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>
|
||||||
@ -198,24 +228,34 @@
|
|||||||
<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>
|
||||||
<FlowPane prefWidth="144.0" styleClass="tour" GridPane.columnIndex="2" GridPane.rowIndex="1">
|
<ScrollPane fitToHeight="true" fitToWidth="true" hbarPolicy="NEVER" prefHeight="144.0" prefWidth="144.0" styleClass="pane" vbarPolicy="NEVER" GridPane.columnIndex="2" GridPane.rowIndex="1">
|
||||||
<children>
|
<content>
|
||||||
<ImageView pickOnBounds="true" preserveRatio="true" />
|
<AnchorPane>
|
||||||
</children>
|
<children>
|
||||||
</FlowPane>
|
<HBox styleClass="background" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0" />
|
||||||
<Label styleClass="text" stylesheets="@style/plateau.css" text="Equipements" GridPane.columnIndex="2" />
|
</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>
|
</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" maxHeight="600.0" maxWidth="1200.0" spacing="50.0" VBox.vgrow="ALWAYS">
|
<HBox alignment="CENTER" maxWidth="1280.0" spacing="50.0">
|
||||||
<children>
|
<children>
|
||||||
<VBox alignment="TOP_CENTER">
|
<VBox alignment="TOP_CENTER">
|
||||||
<children>
|
<children>
|
||||||
<HBox prefHeight="100.0" prefWidth="200.0" styleClass="carteLumiere" stylesheets="@style/plateau.css">
|
<HBox 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>
|
||||||
@ -249,110 +289,88 @@
|
|||||||
</VBox>
|
</VBox>
|
||||||
<VBox alignment="CENTER" spacing="50.0">
|
<VBox alignment="CENTER" spacing="50.0">
|
||||||
<children>
|
<children>
|
||||||
<GridPane hgap="20.0" VBox.vgrow="ALWAYS">
|
<GridPane alignment="CENTER" hgap="20.0" maxHeight="-Infinity" prefHeight="250.0">
|
||||||
<columnConstraints>
|
<columnConstraints>
|
||||||
<ColumnConstraints hgrow="SOMETIMES" />
|
<ColumnConstraints hgrow="ALWAYS" />
|
||||||
<ColumnConstraints hgrow="ALWAYS" minWidth="10.0" prefWidth="100.0" />
|
<ColumnConstraints />
|
||||||
<ColumnConstraints hgrow="SOMETIMES" />
|
<ColumnConstraints hgrow="ALWAYS" />
|
||||||
</columnConstraints>
|
</columnConstraints>
|
||||||
<rowConstraints>
|
<rowConstraints>
|
||||||
<RowConstraints minHeight="10.0" vgrow="SOMETIMES" />
|
<RowConstraints vgrow="ALWAYS" />
|
||||||
</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 hgrow="SOMETIMES" />
|
<ColumnConstraints />
|
||||||
<ColumnConstraints hgrow="SOMETIMES" />
|
<ColumnConstraints />
|
||||||
<ColumnConstraints hgrow="SOMETIMES" />
|
<ColumnConstraints />
|
||||||
</columnConstraints>
|
</columnConstraints>
|
||||||
<rowConstraints>
|
<rowConstraints>
|
||||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
<RowConstraints vgrow="ALWAYS" />
|
||||||
</rowConstraints>
|
</rowConstraints>
|
||||||
<children>
|
<children>
|
||||||
<HBox alignment="TOP_CENTER" styleClass="lieux" stylesheets="@style/plateau.css">
|
<HBox alignment="CENTER" spacing="5.0" styleClass="lieux" stylesheets="@style/plateau.css">
|
||||||
<children>
|
<children>
|
||||||
<StackPane>
|
<StackPane HBox.hgrow="NEVER">
|
||||||
<children>
|
<children>
|
||||||
<FlowPane prefHeight="200.0" prefWidth="200.0" />
|
<ImageView pickOnBounds="true" preserveRatio="true" StackPane.alignment="CENTER" />
|
||||||
<ImageView fitHeight="132.03" fitWidth="94.5675" pickOnBounds="true" preserveRatio="true" />
|
<FlowPane styleClass="lieu" />
|
||||||
</children>
|
</children>
|
||||||
</StackPane>
|
</StackPane>
|
||||||
<StackPane layoutX="39.0" layoutY="12.0">
|
<StackPane layoutX="39.0" layoutY="12.0" maxHeight="360.0" HBox.hgrow="NEVER">
|
||||||
<children>
|
<children>
|
||||||
<FlowPane prefHeight="200.0" prefWidth="200.0" />
|
<ImageView pickOnBounds="true" preserveRatio="true" />
|
||||||
<ImageView fitHeight="132.03" fitWidth="94.5675" pickOnBounds="true" preserveRatio="true" />
|
<FlowPane />
|
||||||
</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" styleClass="lieux" stylesheets="@style/plateau.css" GridPane.columnIndex="1">
|
<HBox alignment="BOTTOM_CENTER" spacing="5.0" styleClass="lieux" stylesheets="@style/plateau.css" GridPane.columnIndex="1">
|
||||||
<children>
|
<children>
|
||||||
<StackPane>
|
<StackPane HBox.hgrow="NEVER">
|
||||||
<children>
|
<children>
|
||||||
<FlowPane prefHeight="200.0" prefWidth="200.0" />
|
<ImageView pickOnBounds="true" preserveRatio="true" />
|
||||||
<ImageView fitHeight="132.03" fitWidth="94.5675" pickOnBounds="true" preserveRatio="true" />
|
<FlowPane />
|
||||||
</children>
|
</children>
|
||||||
</StackPane>
|
</StackPane>
|
||||||
<StackPane>
|
<StackPane HBox.hgrow="NEVER">
|
||||||
<children>
|
<children>
|
||||||
<FlowPane prefHeight="200.0" prefWidth="200.0" />
|
<ImageView pickOnBounds="true" preserveRatio="true" />
|
||||||
<ImageView fitHeight="132.03" fitWidth="94.5675" pickOnBounds="true" preserveRatio="true" />
|
<FlowPane />
|
||||||
</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" styleClass="lieux" stylesheets="@style/plateau.css" GridPane.columnIndex="2">
|
<HBox alignment="TOP_CENTER" spacing="5.0" styleClass="lieux" stylesheets="@style/plateau.css" GridPane.columnIndex="2">
|
||||||
<children>
|
<children>
|
||||||
<StackPane>
|
<StackPane maxHeight="360.0" HBox.hgrow="NEVER">
|
||||||
<children>
|
<children>
|
||||||
<FlowPane prefHeight="200.0" prefWidth="200.0" />
|
<ImageView pickOnBounds="true" preserveRatio="true" />
|
||||||
<ImageView fitHeight="132.03" fitWidth="94.5675" pickOnBounds="true" preserveRatio="true" />
|
<FlowPane />
|
||||||
</children>
|
</children>
|
||||||
</StackPane>
|
</StackPane>
|
||||||
<StackPane>
|
<StackPane maxHeight="360.0" HBox.hgrow="NEVER">
|
||||||
<children>
|
<children>
|
||||||
<FlowPane prefHeight="200.0" prefWidth="200.0" />
|
<ImageView pickOnBounds="true" preserveRatio="true" />
|
||||||
<ImageView fitHeight="132.03" fitWidth="94.5675" pickOnBounds="true" preserveRatio="true" />
|
<FlowPane />
|
||||||
</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">
|
||||||
@ -367,6 +385,97 @@
|
|||||||
<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" />
|
||||||
@ -563,37 +672,15 @@
|
|||||||
</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>
|
|
||||||
</HBox>
|
|
||||||
<HBox prefHeight="100.0" prefWidth="200.0" styleClass="carteVision" stylesheets="@style/plateau.css">
|
|
||||||
<children>
|
|
||||||
<ImageView fitHeight="97.8" fitWidth="70.05" pickOnBounds="true" preserveRatio="true" />
|
|
||||||
</children>
|
|
||||||
<VBox.margin>
|
|
||||||
<Insets bottom="30.0" top="30.0" />
|
|
||||||
</VBox.margin>
|
|
||||||
</HBox>
|
|
||||||
<HBox prefHeight="100.0" prefWidth="200.0" styleClass="carteTenebre" stylesheets="@style/plateau.css">
|
|
||||||
<children>
|
|
||||||
<ImageView fitHeight="97.8" fitWidth="70.05" pickOnBounds="true" preserveRatio="true" />
|
|
||||||
</children>
|
|
||||||
</HBox>
|
|
||||||
</children>
|
|
||||||
</VBox>
|
|
||||||
</children>
|
</children>
|
||||||
</HBox>
|
</HBox>
|
||||||
<GridPane hgap="50.0">
|
<GridPane hgap="50.0" VBox.vgrow="ALWAYS">
|
||||||
<columnConstraints>
|
<columnConstraints>
|
||||||
<ColumnConstraints hgrow="ALWAYS" />
|
<ColumnConstraints hgrow="ALWAYS" />
|
||||||
<ColumnConstraints hgrow="ALWAYS" />
|
<ColumnConstraints hgrow="ALWAYS" />
|
||||||
</columnConstraints>
|
</columnConstraints>
|
||||||
<rowConstraints>
|
<rowConstraints>
|
||||||
<RowConstraints minHeight="10.0" vgrow="SOMETIMES" />
|
<RowConstraints vgrow="ALWAYS" />
|
||||||
</rowConstraints>
|
</rowConstraints>
|
||||||
<children>
|
<children>
|
||||||
<GridPane nodeOrientation="LEFT_TO_RIGHT">
|
<GridPane nodeOrientation="LEFT_TO_RIGHT">
|
||||||
@ -626,13 +713,26 @@
|
|||||||
<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>
|
||||||
<FlowPane prefHeight="144.0" prefWidth="144.0" styleClass="tour" GridPane.columnIndex="2" GridPane.rowIndex="1">
|
<ScrollPane fitToHeight="true" fitToWidth="true" hbarPolicy="NEVER" prefHeight="144.0" prefWidth="144.0" styleClass="pane" vbarPolicy="NEVER" GridPane.columnIndex="2" GridPane.rowIndex="1">
|
||||||
<children>
|
<content>
|
||||||
<ImageView pickOnBounds="true" preserveRatio="true" />
|
<AnchorPane>
|
||||||
</children>
|
<children>
|
||||||
</FlowPane>
|
<HBox styleClass="background" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0" />
|
||||||
<Label styleClass="text" stylesheets="@style/plateau.css" text="Equipements" GridPane.columnIndex="2" />
|
</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>
|
</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>
|
||||||
@ -664,13 +764,23 @@
|
|||||||
<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>
|
||||||
<FlowPane prefHeight="144.0" prefWidth="144.0" styleClass="tour" GridPane.columnIndex="2" GridPane.rowIndex="1">
|
<ScrollPane fitToHeight="true" fitToWidth="true" hbarPolicy="NEVER" prefHeight="144.0" prefWidth="144.0" styleClass="pane" vbarPolicy="NEVER" GridPane.columnIndex="2" GridPane.rowIndex="1">
|
||||||
<children>
|
<content>
|
||||||
<ImageView pickOnBounds="true" preserveRatio="true" />
|
<AnchorPane>
|
||||||
</children>
|
<children>
|
||||||
</FlowPane>
|
<HBox styleClass="background" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0" />
|
||||||
<Label styleClass="text" stylesheets="@style/plateau.css" text="Equipements" GridPane.columnIndex="2" />
|
</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>
|
</children>
|
||||||
|
<padding>
|
||||||
|
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
|
||||||
|
</padding>
|
||||||
</GridPane>
|
</GridPane>
|
||||||
</children>
|
</children>
|
||||||
<padding>
|
<padding>
|
||||||
@ -681,7 +791,7 @@
|
|||||||
</VBox>
|
</VBox>
|
||||||
<Group>
|
<Group>
|
||||||
<children>
|
<children>
|
||||||
<GridPane hgap="50.0" prefWidth="885.0" rotate="-90.0">
|
<GridPane hgap="50.0" rotate="-90.0">
|
||||||
<columnConstraints>
|
<columnConstraints>
|
||||||
<ColumnConstraints hgrow="ALWAYS" />
|
<ColumnConstraints hgrow="ALWAYS" />
|
||||||
<ColumnConstraints hgrow="ALWAYS" />
|
<ColumnConstraints hgrow="ALWAYS" />
|
||||||
@ -720,13 +830,23 @@
|
|||||||
<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>
|
||||||
<FlowPane prefWidth="144.0" styleClass="tour" GridPane.columnIndex="2" GridPane.rowIndex="1">
|
<ScrollPane fitToHeight="true" fitToWidth="true" hbarPolicy="NEVER" prefHeight="144.0" prefWidth="144.0" styleClass="pane" vbarPolicy="NEVER" GridPane.columnIndex="2" GridPane.rowIndex="1">
|
||||||
<children>
|
<content>
|
||||||
<ImageView pickOnBounds="true" preserveRatio="true" />
|
<AnchorPane>
|
||||||
</children>
|
<children>
|
||||||
</FlowPane>
|
<HBox styleClass="background" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0" />
|
||||||
<Label styleClass="text" stylesheets="@style/plateau.css" text="Equipements" GridPane.columnIndex="2" />
|
</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>
|
</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>
|
||||||
@ -758,13 +878,23 @@
|
|||||||
<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>
|
||||||
<FlowPane prefHeight="144.0" prefWidth="144.0" styleClass="tour" GridPane.columnIndex="2" GridPane.rowIndex="1">
|
<ScrollPane fitToHeight="true" fitToWidth="true" hbarPolicy="NEVER" prefHeight="144.0" prefWidth="144.0" styleClass="pane" vbarPolicy="NEVER" GridPane.columnIndex="2" GridPane.rowIndex="1">
|
||||||
<children>
|
<content>
|
||||||
<ImageView pickOnBounds="true" preserveRatio="true" />
|
<AnchorPane>
|
||||||
</children>
|
<children>
|
||||||
</FlowPane>
|
<HBox styleClass="background" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0" />
|
||||||
<Label styleClass="text" stylesheets="@style/plateau.css" text="Equipements" GridPane.columnIndex="2" />
|
</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>
|
</children>
|
||||||
|
<padding>
|
||||||
|
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
|
||||||
|
</padding>
|
||||||
</GridPane>
|
</GridPane>
|
||||||
</children>
|
</children>
|
||||||
<padding>
|
<padding>
|
||||||
|
37
src/ihm/ressources/RecevoirCarte.fxml
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
<?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>
|
@ -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 layoutX="519.0" layoutY="31.0" mnemonicParsing="false" onMouseClicked="#pagePrecedente" prefHeight="59.0" prefWidth="225.0" styleClass="bouton" text="Page précédente">
|
<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>
|
||||||
<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 mnemonicParsing="false" onMouseClicked="#pageSuivante" prefHeight="59.0" prefWidth="195.0" styleClass="bouton" text="Page suivante">
|
<Button fx:id="suivant" 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>
|
||||||
|
51
src/ihm/ressources/ReglesPause.fxml
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
<?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>
|
@ -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="Vous êtes :">
|
<Label text="%vousetes">
|
||||||
<font>
|
<font>
|
||||||
<Font size="24.0" />
|
<Font size="24.0" />
|
||||||
</font>
|
</font>
|
||||||
|
@ -3,16 +3,26 @@
|
|||||||
<?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="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">
|
<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">
|
||||||
<children>
|
<children>
|
||||||
<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">
|
<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">
|
||||||
<font>
|
<children>
|
||||||
<Font size="13.0" />
|
<Label fx:id="titre" alignment="CENTER" prefHeight="88.0" prefWidth="158.0" styleClass="text" text="%voulez.vous.faire.action" wrapText="true">
|
||||||
</font>
|
<font>
|
||||||
</Label>
|
<Font size="13.0" />
|
||||||
<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" />
|
</font>
|
||||||
<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" />
|
</Label>
|
||||||
|
<HBox alignment="CENTER">
|
||||||
|
<children>
|
||||||
|
<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>
|
||||||
|
88
src/ihm/ressources/choixJoueurAttq.fxml
Normal file
@ -0,0 +1,88 @@
|
|||||||
|
<?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>
|
BIN
src/ihm/ressources/img/des1.png
Normal file
After Width: | Height: | Size: 3.5 KiB |
BIN
src/ihm/ressources/img/des2.png
Normal file
After Width: | Height: | Size: 3.0 KiB |
BIN
src/ihm/ressources/img/des3.png
Normal file
After Width: | Height: | Size: 3.8 KiB |
BIN
src/ihm/ressources/img/des4.png
Normal file
After Width: | Height: | Size: 6.7 KiB |
BIN
src/ihm/ressources/img/des5.png
Normal file
After Width: | Height: | Size: 5.2 KiB |
BIN
src/ihm/ressources/img/des6.png
Normal file
After Width: | Height: | Size: 6.0 KiB |
BIN
src/ihm/ressources/img/desf1.png
Normal file
After Width: | Height: | Size: 46 KiB |
BIN
src/ihm/ressources/img/desf2.png
Normal file
After Width: | Height: | Size: 48 KiB |
BIN
src/ihm/ressources/img/desf3.png
Normal file
After Width: | Height: | Size: 49 KiB |
BIN
src/ihm/ressources/img/desf4.png
Normal file
After Width: | Height: | Size: 47 KiB |
34
src/ihm/ressources/jouerSonTour1.fxml
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<?import javafx.scene.control.Button?>
|
||||||
|
<?import javafx.scene.control.Label?>
|
||||||
|
<?import javafx.scene.layout.Pane?>
|
||||||
|
<?import javafx.scene.shape.Polygon?>
|
||||||
|
<?import javafx.scene.shape.Rectangle?>
|
||||||
|
<?import javafx.scene.text.Font?>
|
||||||
|
|
||||||
|
<Pane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="589.0" prefWidth="881.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1">
|
||||||
|
<children>
|
||||||
|
<Label layoutX="265.0" layoutY="29.0" text="C'est au tour du ">
|
||||||
|
<font>
|
||||||
|
<Font size="36.0" />
|
||||||
|
</font>
|
||||||
|
</Label>
|
||||||
|
<Rectangle arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="200.0" layoutX="221.0" layoutY="135.0" stroke="BLACK" strokeType="INSIDE" width="200.0" />
|
||||||
|
<Polygon fill="DODGERBLUE" layoutX="551.0" layoutY="216.0" points="-75.79998779296875, 98.80001831054688, 97.0, 98.80001831054688, 8.20001220703125, -59.199981689453125" stroke="BLACK" strokeType="INSIDE" />
|
||||||
|
<Button layoutX="401.0" layoutY="394.0" mnemonicParsing="false" text="Lancer les dés" />
|
||||||
|
<Label layoutX="275.0" layoutY="222.0" text="Score dés 1">
|
||||||
|
<font>
|
||||||
|
<Font size="18.0" />
|
||||||
|
</font></Label>
|
||||||
|
<Label layoutX="516.0" layoutY="249.0" text="Score dés 2">
|
||||||
|
<font>
|
||||||
|
<Font size="18.0" />
|
||||||
|
</font></Label>
|
||||||
|
<Label layoutX="535.0" layoutY="29.0" text="joueur 1">
|
||||||
|
<font>
|
||||||
|
<Font size="36.0" />
|
||||||
|
</font>
|
||||||
|
</Label>
|
||||||
|
</children>
|
||||||
|
</Pane>
|