Merge conflict

This commit is contained in:
nawfe 2020-04-30 14:10:19 +02:00
commit 26f8971225
56 changed files with 412 additions and 1395 deletions

BIN
lib/javafx-swt.jar Normal file

Binary file not shown.

BIN
lib/javafx.base.jar Normal file

Binary file not shown.

BIN
lib/javafx.controls.jar Normal file

Binary file not shown.

BIN
lib/javafx.fxml.jar Normal file

Binary file not shown.

BIN
lib/javafx.graphics.jar Normal file

Binary file not shown.

BIN
lib/javafx.media.jar Normal file

Binary file not shown.

3
lib/javafx.properties Normal file
View File

@ -0,0 +1,3 @@
javafx.version=11.0.2
javafx.runtime.version=11.0.2+1
javafx.runtime.build=1

BIN
lib/javafx.swing.jar Normal file

Binary file not shown.

BIN
lib/javafx.web.jar Normal file

Binary file not shown.

View File

@ -18,4 +18,13 @@ public class QueryGenerator {
return "public." + '"' + s + '"'; return "public." + '"' + s + '"';
} }
public static String getIdWithNameFrom(String table, String name) {
return "SELECT 'id' FROM " + getTable(table) + "WHERE nom ='" + name + "'";
}
public static String getNameWithIdFrom(String table, int d) {
return "SELECT name FROM " + getTable(table) + "WHERE id =" + d;
}
} }

View File

@ -40,5 +40,4 @@ public class Record {
return String.format("%-20.30s %-30.30s %-20.30s%n", this.getId(), this.getNom(), this.getImg()); return String.format("%-20.30s %-30.30s %-20.30s%n", this.getId(), this.getNom(), this.getImg());
} }
} }

View File

@ -84,6 +84,14 @@ public class Table {
return " " + this.getList(); return " " + this.getList();
} }
public boolean isEmpty() {
if(list.isEmpty()) {
return true;
} else {
return false;
}
}

View File

@ -1,60 +0,0 @@
package ihm;
/**
* @author https://www.programcreek.com/java-api-examples/?code=AlmasB%2FFXTutorials%2FFXTutorials-master%2Fsrc%2Fcom%2Falmasb%2Ftutorial5%2FDice.java
*
*/
import javafx.animation.RotateTransition;
import javafx.beans.property.SimpleIntegerProperty;
import javafx.geometry.Pos;
import javafx.scene.layout.StackPane;
import javafx.scene.paint.Color;
import javafx.scene.shape.Rectangle;
import javafx.scene.text.Text;
import javafx.util.Duration;
public class Dice extends StackPane {
public static int MAX_VALUE = 6;
public static final int MIN_VALUE = 1;
public final SimpleIntegerProperty valueProperty = new SimpleIntegerProperty();
int i = 0;
public Dice(int valeurMax) {
MAX_VALUE = valeurMax;
Rectangle rect = new Rectangle(50, 50);
Text text = new Text();
text.setFill(Color.WHITE);
text.textProperty().bind(valueProperty.asString());
this.setAlignment(Pos.CENTER);
getChildren().addAll(rect, text);
this.setOnMouseClicked(event -> roll());
}
public void roll() {
RotateTransition rt = new RotateTransition(Duration.seconds(0.5), this);
rt.setFromAngle(0);
rt.setToAngle(360);
int cycles = 2000;
rt.setOnFinished(event -> {
valueProperty.set((int)(Math.random() * (MAX_VALUE - MIN_VALUE + 1)) + MIN_VALUE);
if(cycles < i) {
rt.play();
i++;
}
});
rt.play();
}
}

View File

@ -2,6 +2,7 @@ package ihm.controller;
import java.io.IOException; import java.io.IOException;
import java.net.URL; import java.net.URL;
import java.util.Locale;
import java.util.Random; import java.util.Random;
import java.util.ResourceBundle; import java.util.ResourceBundle;
@ -34,12 +35,14 @@ public class JouerSonTour1Controller implements Initializable{
@Override @Override
public void initialize(URL arg0, ResourceBundle arg1) { public void initialize(URL arg0, ResourceBundle arg1) {
System.out.println("\tLancements des dès");
//nomJoueur.setText(joueur.getNom()); //nomJoueur.setText(joueur.getNom());
int OFFSET_X = 0; int OFFSET_X = 0;
int OFFSET_Y = 0; int OFFSET_Y = 0;
int WIDTH = 200; int WIDTH = 80;
int HEIGHT = 200; int HEIGHT = 80;
int COUNT = 6; int COUNT = 6;
int COLUMNS = 6; int COLUMNS = 6;
@ -80,12 +83,11 @@ public class JouerSonTour1Controller implements Initializable{
@FXML @FXML
public void lancerDes(MouseEvent mouseEvent) throws IOException, InterruptedException{ public void lancerDes(MouseEvent mouseEvent) throws IOException, InterruptedException{
final URL fxmlURL = getClass().getResource("../ressources/Jouer_tour(2)carte_lieux.fxml");
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", Locale.ENGLISH);
Thread.sleep(1000); final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
Pane root = fxmlLoader.load();
Pane pane = FXMLLoader.load(getClass().getResource("../ressources/Jouer_tour(2)carte_lieux.fxml")); rootPane.getChildren().setAll(root);
rootPane.getChildren().setAll(pane);
} }
public void deplacerPion(CarteLieu lieux) { public void deplacerPion(CarteLieu lieux) {

View File

@ -21,6 +21,7 @@ public class JouerSonTour2Controller implements Initializable{
@Override @Override
public void initialize(URL arg0, ResourceBundle arg1) { public void initialize(URL arg0, ResourceBundle arg1) {
System.out.println("\tDescrption du lieux");
//descriptionLieu.setText(lieu.getDescription()); //descriptionLieu.setText(lieu.getDescription());
} }

View File

@ -4,6 +4,7 @@ package ihm.controller;
import java.io.IOException; import java.io.IOException;
import java.net.URL; import java.net.URL;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Locale; import java.util.Locale;
import java.util.Map; import java.util.Map;
@ -11,33 +12,27 @@ import java.util.ResourceBundle;
import ihm.PopUp; import ihm.PopUp;
import ihm.PopUpBoolean; import ihm.PopUpBoolean;
import ihm.SpriteAnimation;
import javafx.animation.Animation;
import javafx.event.Event;
import javafx.event.EventHandler;
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.Rectangle2D;
import javafx.scene.Group;
import javafx.scene.Parent; import javafx.scene.Parent;
import javafx.scene.control.Button; import javafx.scene.control.Button;
import javafx.scene.control.Label; import javafx.scene.control.Label;
import javafx.scene.image.ImageView; import javafx.scene.image.ImageView;
import javafx.scene.layout.AnchorPane; import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.HBox; import javafx.scene.layout.HBox;
import javafx.scene.layout.Pane;
import javafx.scene.layout.VBox; import javafx.scene.layout.VBox;
import javafx.scene.shape.Circle;
import main.GestionnaireJeu;
import main.Joueur; import main.Joueur;
import main.View;
public class PlateauController implements Initializable { public class PlateauController implements Initializable {
private List<Joueur> listJoueur = new ArrayList<Joueur>();
private List<VBox> vboxJoueur = new ArrayList<VBox>();
private List<HBox> hboxJoueur = new ArrayList<HBox>();
private List<Button> btnRevelation = new ArrayList<Button>();
private List<ImageView> cartePerso = new ArrayList<ImageView>();
private List<Label> nomJoueur = new ArrayList<Label>();
private List<Joueur> listJoueur = new ArrayList<Joueur>();
private Map<Joueur,Pane> joueursPane;
@FXML private AnchorPane rootPane;
@FXML private HBox joueur1; @FXML private HBox joueur1;
@FXML private HBox joueur2; @FXML private HBox joueur2;
@FXML private HBox joueur3; @FXML private HBox joueur3;
@ -47,6 +42,19 @@ public class PlateauController implements Initializable {
@FXML private VBox joueur7; @FXML private VBox joueur7;
@FXML private VBox joueur8; @FXML private VBox joueur8;
private List<VBox> vboxJoueur = new ArrayList<VBox>();
private List<HBox> hboxJoueur = new ArrayList<HBox>();
private List<Button> btnRevelation = new ArrayList<Button>();
private List<ImageView> cartePerso = new ArrayList<ImageView>();
private List<Label> nomJoueur = new ArrayList<Label>();
private List<AnchorPane> tour = new ArrayList<AnchorPane>();
@FXML private HBox lieux;
@FXML private HBox vie;
private List<Circle> pionLieux = new ArrayList<Circle>();
private List<Circle> pionVie = new ArrayList<Circle>();
public static int DICE_SIX = 2; public static int DICE_SIX = 2;
public static int DICE_QUATRE = 1; public static int DICE_QUATRE = 1;
public static int DICE_BOTH = 0; public static int DICE_BOTH = 0;
@ -57,7 +65,18 @@ public class PlateauController implements Initializable {
@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 ...");
//initialisation des attributs des joueurs
GestionnaireJeu gj = GestionnaireJeu.getGestionnaireJeu();
this.joueursPane = new HashMap<Joueur, Pane>();
Map<Integer, Joueur> map = gj.getMapJoueurs();
for(int i : map.keySet()) {
this.joueursPane.put(map.get(i), getPaneJoueur(i));
}
System.out.println(joueursPane);
this.hboxJoueur.add(joueur1); this.hboxJoueur.add(joueur1);
this.hboxJoueur.add(joueur2); this.hboxJoueur.add(joueur2);
@ -65,6 +84,7 @@ public class PlateauController implements Initializable {
this.hboxJoueur.add(joueur4); this.hboxJoueur.add(joueur4);
for (HBox hbox : hboxJoueur) { for (HBox hbox : hboxJoueur) {
tour.add((AnchorPane) hbox.getChildren().get(0));
VBox carte = (VBox) hbox.getChildren().get(1); VBox carte = (VBox) hbox.getChildren().get(1);
cartePerso.add((ImageView) carte.getChildren().get(0)); cartePerso.add((ImageView) carte.getChildren().get(0));
btnRevelation.add((Button) carte.getChildren().get(1)); btnRevelation.add((Button) carte.getChildren().get(1));
@ -78,6 +98,7 @@ public class PlateauController implements Initializable {
this.vboxJoueur.add(joueur8); this.vboxJoueur.add(joueur8);
for (VBox vbox : vboxJoueur) { for (VBox vbox : vboxJoueur) {
tour.add((AnchorPane) vbox.getChildren().get(0));
HBox joueur = (HBox) vbox.getChildren().get(1); HBox joueur = (HBox) vbox.getChildren().get(1);
VBox carte = (VBox) joueur.getChildren().get(1); VBox carte = (VBox) joueur.getChildren().get(1);
cartePerso.add((ImageView) carte.getChildren().get(0)); cartePerso.add((ImageView) carte.getChildren().get(0));
@ -102,13 +123,58 @@ public class PlateauController implements Initializable {
} }
listJoueur = View.getJoueurs(); //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 Pane getPaneJoueur(int i) {
Pane parent = getPaneCoupleJoueurs(i);
int position = i%2;
return (Pane) parent.getChildren().get(position);
}
private Pane getPaneCoupleJoueurs(int i) {
int position = (i%8)/2;
Pane parent = (Pane) rootPane.getChildren().get(0);
return (Pane) parent.getChildren().get(position+1);
} }
/** /**
* Affiche aux yeux de tous la carte personnage du joueur * Affiche aux yeux de tous la carte personnage du joueur
* *
* @param j : Le joueur sur lequel on a cliqu<EFBFBD> * @param j : Le joueur sur lequel on a cliqué
*/ */
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");
@ -159,16 +225,21 @@ public class PlateauController implements Initializable {
* @param j : map donnant le joueur et son numero * @param j : map donnant le joueur et son numero
*/ */
public void showInformation(Map<Integer, Joueur> j) { public void showInformation(Map<Integer, Joueur> j) {
/*System.out.println("\tplacement des joueurs"); System.out.println("\tPlacement des joueurs");
int taille = this.vboxJoueur.size() + this.hboxJoueur.size(); int taille = this.vboxJoueur.size() + this.hboxJoueur.size();
for (int i=0; i<taille; i++) { for (int i=0; i<taille; i++) {
if (j.get(i) != null) if (j.get(i) != null)
nomJoueur.get(i).setText(j.get(i).getNom()); nomJoueur.get(i).setText(j.get(i).getNom());
else { else {
vboxJoueur.get(i).setVisible(false); if (i < 4) {
hboxJoueur.get(i).setVisible(false);
}else {
vboxJoueur.get(i-4).setVisible(false);
}
} }
}*/ }
} }
public void rollDice(Joueur joueur, int typeDice, int[] rolls) { public void rollDice(Joueur joueur, int typeDice, int[] rolls) {

View File

@ -115,14 +115,18 @@ public class PlayersController implements Initializable{
// Creer une configuration // Creer une configuration
//View.applyConfiguration(new Configuration(joueurs, nbJoueursV, nbJoueursH)); //View.applyConfiguration(new Configuration(joueurs, nbJoueursV, nbJoueursH));
GestionnaireJeu gj = GestionnaireJeu.getGestionnaireJeu();
gj.setConfiguration(new Configuration(this.joueurs));
final URL fxmlURL = getClass().getResource("../ressources/Plateau.fxml"); final URL fxmlURL = getClass().getResource("../ressources/Plateau.fxml");
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", Locale.FRENCH); final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", Locale.FRENCH);
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle); final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
AnchorPane root = fxmlLoader.load(); AnchorPane root = fxmlLoader.load();
PlateauController pc = fxmlLoader.getController(); PlateauController pc = fxmlLoader.getController();
GestionnaireJeu.setPlateauController(pc);
GestionnaireJeu.setConfiguration(new Configuration(this.joueurs)); gj.setPlateauController(pc);
Map<Integer, Joueur> map = GestionnaireJeu.getJoueursMap(new Configuration(this.joueurs));
Map<Integer, Joueur> map = gj.getMapJoueurs();
pc.showInformation(map); pc.showInformation(map);

View File

@ -1,11 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.image.Image?>
<?import javafx.scene.image.ImageView?>
<ImageView fitHeight="202.0" fitWidth="173.0" preserveRatio="true" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1">
<image>
<Image url="@img/dé.png" />
</image>
</ImageView>

View File

@ -1,24 +0,0 @@
<?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.text.Font?>
<Pane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="625.0" prefWidth="947.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1">
<children>
<Button layoutX="156.0" layoutY="180.0" lineSpacing="2.0" mnemonicParsing="false" prefHeight="277.0" prefWidth="184.0" text="Avènement suprême Barre de chocolat" wrapText="true">
<font>
<Font size="18.0" />
</font>
</Button>
<Button layoutX="387.0" layoutY="302.0" mnemonicParsing="false" prefHeight="155.0" prefWidth="195.0" text="%reveler.et.soigner" />
<Button layoutX="628.0" layoutY="302.0" mnemonicParsing="false" prefHeight="155.0" prefWidth="171.0" text="%rien.faire" />
<Label layoutX="414.0" layoutY="147.0" prefHeight="89.0" prefWidth="249.0" text="%effet.carte">
<font>
<Font size="52.0" />
</font>
</Label>
</children>
</Pane>

View File

@ -1,99 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.Pane?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.shape.Rectangle?>
<?import javafx.scene.text.Font?>
<Pane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1">
<children>
<VBox prefHeight="400.0" prefWidth="600.0">
<children>
<HBox alignment="CENTER" prefHeight="106.0" prefWidth="600.0">
<children>
<HBox alignment="CENTER" prefHeight="100.0" prefWidth="200.0">
<children>
<Button mnemonicParsing="false" text="%joueur1" />
</children>
</HBox>
<HBox alignment="CENTER" prefHeight="100.0" prefWidth="200.0">
<children>
<Button mnemonicParsing="false" text="%joueur2" />
</children>
</HBox>
<HBox alignment="CENTER" prefHeight="100.0" prefWidth="200.0">
<children>
<Button mnemonicParsing="false" text="%joueur3" />
</children>
</HBox>
<HBox alignment="CENTER" prefHeight="100.0" prefWidth="200.0">
<children>
<Button mnemonicParsing="false" text="%joueur4" />
</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="%jouer.a.qui.donner.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="%joueur5" />
</children>
</HBox>
<HBox alignment="CENTER" prefHeight="100.0" prefWidth="200.0">
<children>
<Button mnemonicParsing="false" text="%joueur6" />
</children>
</HBox>
<HBox alignment="CENTER" prefHeight="100.0" prefWidth="200.0">
<children>
<Button mnemonicParsing="false" text="%joueur7" />
</children>
</HBox>
<HBox alignment="CENTER" prefHeight="100.0" prefWidth="200.0">
<children>
<Button mnemonicParsing="false" text="%joueur8" />
</children>
</HBox>
</children>
</HBox>
</children>
</VBox>
</children>
</Pane>

View File

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

View File

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

View File

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

View File

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

View File

@ -6,23 +6,23 @@
<?import javafx.scene.layout.Pane?> <?import javafx.scene.layout.Pane?>
<?import javafx.scene.text.Font?> <?import javafx.scene.text.Font?>
<Pane fx:id="rootPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="480.0" prefWidth="640.0" stylesheets="@style/popUp.css" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ihm.controller.JouerSonTour1Controller"> <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.JouerSonTour1Controller">
<children> <children>
<Label layoutX="135.0" layoutY="29.0" text="%au.tour.de"> <Label layoutX="54.0" layoutY="19.0" text="%au.tour.de">
<font> <font>
<Font size="36.0" /> <Font size="14.0" />
</font> </font>
</Label> </Label>
<Button layoutX="262.0" layoutY="388.0" mnemonicParsing="false" onMouseClicked="#lancerDes" text="%lancer.de.des"> <Button layoutX="70.0" layoutY="140.0" mnemonicParsing="false" onMouseClicked="#lancerDes" text="%lancer.de.des">
<font> <font>
<Font size="18.0" /> <Font size="14.0" />
</font></Button> </font></Button>
<Label fx:id="nomJoueur" layoutX="405.0" layoutY="29.0" text="%joueur1"> <Label fx:id="nomJoueur" layoutX="140.0" layoutY="19.0" text="%joueur1">
<font> <font>
<Font size="36.0" /> <Font size="14.0" />
</font> </font>
</Label> </Label>
<AnchorPane fx:id="d6" layoutX="91.0" layoutY="140.0" prefHeight="200.0" prefWidth="200.0" /> <AnchorPane fx:id="d6" layoutX="23.0" layoutY="50.0" prefHeight="80.0" prefWidth="80.0" />
<AnchorPane fx:id="d4" layoutX="379.0" layoutY="140.0" prefHeight="200.0" prefWidth="200.0" /> <AnchorPane fx:id="d4" layoutX="129.0" layoutY="50.0" prefHeight="80.0" prefWidth="80.0" />
</children> </children>
</Pane> </Pane>

View File

@ -3,24 +3,24 @@
<?import javafx.scene.control.Button?> <?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?> <?import javafx.scene.control.Label?>
<?import javafx.scene.image.ImageView?> <?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.Pane?> <?import javafx.scene.layout.Pane?>
<?import javafx.scene.text.Font?> <?import javafx.scene.text.Font?>
<Pane fx:id="rootPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="480.0" prefWidth="640.0" stylesheets="@style/popUp.css" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ihm.controller.JouerSonTour2Controller">
<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.JouerSonTour2Controller">
<children> <children>
<Label fx:id="descriptionLieu" layoutX="315.0" layoutY="151.0" text="%description.capacite.carte.lieux"> <Pane fx:id="rootPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="180.0" prefWidth="255.0" stylesheets="@style/popUp.css">
<font> <children>
<Font size="18.0" /> <Button layoutX="112.0" layoutY="128.0" mnemonicParsing="false" onMouseClicked="#capaciteLieu" text="%utiliser.capaciter.lieux" />
</font> <Button layoutX="136.0" layoutY="90.0" mnemonicParsing="false" onMouseClicked="#ignorerEtape" text="%sauter.etape" />
</Label> <ImageView fitHeight="114.0" fitWidth="82.0" layoutX="14.0" layoutY="33.0" pickOnBounds="true" preserveRatio="true" />
<Button layoutX="356.0" layoutY="227.0" mnemonicParsing="false" onMouseClicked="#capaciteLieu" text="%utiliser.capaciter.lieux"> <Label fx:id="descriptionLieu" layoutX="96.0" layoutY="33.0" text="%description.capacite.carte.lieux">
<font> <font>
<Font size="18.0" /> <Font size="11.0" />
</font></Button> </font>
<Button layoutX="389.0" layoutY="307.0" mnemonicParsing="false" onMouseClicked="#ignorerEtape" text="%sauter.etape"> </Label>
<font> </children>
<Font size="18.0" /> </Pane>
</font></Button>
<ImageView fitHeight="326.0" fitWidth="233.5" layoutX="64.0" layoutY="84.0" pickOnBounds="true" preserveRatio="true" />
</children> </children>
</Pane> </AnchorPane>

View File

@ -1,23 +0,0 @@
<?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.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>
<Label layoutX="137.0" layoutY="100.0" prefHeight="46.0" prefWidth="362.0" text="%joueur1.soigne.joueur2">
<font>
<Font size="29.0" />
</font>
</Label>
<Button layoutX="246.0" layoutY="175.0" mnemonicParsing="false" prefHeight="100.0" prefWidth="109.0" text="6">
<font>
<Font size="47.0" />
</font>
</Button>
<Button layoutX="243.0" layoutY="313.0" mnemonicParsing="false" prefHeight="40.0" prefWidth="116.0" text="%lancer.de.des" />
</children>
</Pane>

View File

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.image.Image?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.BorderPane?>
<BorderPane prefHeight="200.0" prefWidth="200.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ihm.controller.MenuJoueurController">
<top>
<ImageView fitHeight="34.0" fitWidth="32.0" onMousePressed="#changeZoneToScrollPaneJoueur" pickOnBounds="true" preserveRatio="true" BorderPane.alignment="CENTER_RIGHT">
<image>
<Image url="@img/menuButton.png" />
</image>
</ImageView>
</top>
</BorderPane>

View File

@ -4,6 +4,7 @@
<?import javafx.geometry.Insets?> <?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?> <?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?> <?import javafx.scene.control.Label?>
<?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.BorderPane?> <?import javafx.scene.layout.BorderPane?>
@ -11,7 +12,7 @@
<?import javafx.scene.layout.VBox?> <?import javafx.scene.layout.VBox?>
<?import javafx.scene.shape.Circle?> <?import javafx.scene.shape.Circle?>
<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="1080.0" prefWidth="1920.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ihm.controller.PlateauController"> <AnchorPane fx:id="rootPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="1080.0" prefWidth="1920.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ihm.controller.PlateauController">
<children> <children>
<BorderPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="800.0" prefWidth="1280.0" styleClass="background" stylesheets="@style/plateau.css" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"> <BorderPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="800.0" prefWidth="1280.0" styleClass="background" stylesheets="@style/plateau.css" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<top> <top>
@ -22,7 +23,13 @@
<AnchorPane prefHeight="155.0" prefWidth="255.0" styleClass="tour" /> <AnchorPane prefHeight="155.0" prefWidth="255.0" styleClass="tour" />
<VBox alignment="CENTER" prefHeight="155.0" prefWidth="116.0"> <VBox alignment="CENTER" prefHeight="155.0" prefWidth="116.0">
<children> <children>
<ImageView fitHeight="97.8" fitWidth="70.05" pickOnBounds="true" preserveRatio="true" /> <ImageView fitHeight="97.8" fitWidth="70.05" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@img/dosCartesPersonnage.jpg" />
</image>
<VBox.margin>
<Insets bottom="5.0" />
</VBox.margin></ImageView>
<Button mnemonicParsing="false" styleClass="bouton" stylesheets="@style/plateau.css" text="%se.reveler" /> <Button mnemonicParsing="false" styleClass="bouton" stylesheets="@style/plateau.css" text="%se.reveler" />
</children> </children>
<HBox.margin> <HBox.margin>
@ -58,7 +65,13 @@
<AnchorPane prefHeight="155.0" prefWidth="255.0" styleClass="tour" /> <AnchorPane prefHeight="155.0" prefWidth="255.0" styleClass="tour" />
<VBox alignment="CENTER" prefHeight="155.0" prefWidth="116.0"> <VBox alignment="CENTER" prefHeight="155.0" prefWidth="116.0">
<children> <children>
<ImageView fitHeight="97.8" fitWidth="70.05" pickOnBounds="true" preserveRatio="true" /> <ImageView fitHeight="97.8" fitWidth="70.05" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@img/dosCartesPersonnage.jpg" />
</image>
<VBox.margin>
<Insets bottom="5.0" />
</VBox.margin></ImageView>
<Button mnemonicParsing="false" styleClass="bouton" stylesheets="@style/plateau.css" text="%se.reveler" /> <Button mnemonicParsing="false" styleClass="bouton" stylesheets="@style/plateau.css" text="%se.reveler" />
</children> </children>
<HBox.margin> <HBox.margin>
@ -100,7 +113,13 @@
<AnchorPane prefHeight="180.0" prefWidth="255.0" styleClass="tour" /> <AnchorPane prefHeight="180.0" prefWidth="255.0" styleClass="tour" />
<VBox alignment="CENTER" prefHeight="155.0" prefWidth="116.0"> <VBox alignment="CENTER" prefHeight="155.0" prefWidth="116.0">
<children> <children>
<ImageView fitHeight="97.8" fitWidth="70.05" pickOnBounds="true" preserveRatio="true" /> <ImageView fitHeight="97.8" fitWidth="70.05" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@img/dosCartesPersonnage.jpg" />
</image>
<VBox.margin>
<Insets bottom="5.0" />
</VBox.margin></ImageView>
<Button mnemonicParsing="false" styleClass="bouton" stylesheets="@style/plateau.css" text="%se.reveler" /> <Button mnemonicParsing="false" styleClass="bouton" stylesheets="@style/plateau.css" text="%se.reveler" />
</children> </children>
<HBox.margin> <HBox.margin>
@ -136,7 +155,13 @@
<AnchorPane prefHeight="155.0" prefWidth="255.0" styleClass="tour" /> <AnchorPane prefHeight="155.0" prefWidth="255.0" styleClass="tour" />
<VBox alignment="CENTER" prefHeight="155.0" prefWidth="116.0"> <VBox alignment="CENTER" prefHeight="155.0" prefWidth="116.0">
<children> <children>
<ImageView fitHeight="97.8" fitWidth="70.05" pickOnBounds="true" preserveRatio="true" /> <ImageView fitHeight="97.8" fitWidth="70.05" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@img/dosCartesPersonnage.jpg" />
</image>
<VBox.margin>
<Insets bottom="5.0" />
</VBox.margin></ImageView>
<Button mnemonicParsing="false" styleClass="bouton" stylesheets="@style/plateau.css" text="%se.reveler" /> <Button mnemonicParsing="false" styleClass="bouton" stylesheets="@style/plateau.css" text="%se.reveler" />
</children> </children>
<HBox.margin> <HBox.margin>
@ -196,7 +221,13 @@
</VBox> </VBox>
<VBox alignment="CENTER" prefHeight="200.0" prefWidth="100.0"> <VBox alignment="CENTER" prefHeight="200.0" prefWidth="100.0">
<children> <children>
<ImageView fitHeight="97.8" fitWidth="70.05" pickOnBounds="true" preserveRatio="true" /> <ImageView fitHeight="97.8" fitWidth="70.05" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@img/dosCartesPersonnage.jpg" />
</image>
<VBox.margin>
<Insets bottom="5.0" />
</VBox.margin></ImageView>
<Button mnemonicParsing="false" styleClass="bouton" stylesheets="@style/plateau.css" text="%se.reveler" /> <Button mnemonicParsing="false" styleClass="bouton" stylesheets="@style/plateau.css" text="%se.reveler" />
</children> </children>
</VBox> </VBox>
@ -233,7 +264,13 @@
</VBox> </VBox>
<VBox alignment="CENTER" prefHeight="200.0" prefWidth="100.0"> <VBox alignment="CENTER" prefHeight="200.0" prefWidth="100.0">
<children> <children>
<ImageView fitHeight="97.8" fitWidth="70.05" pickOnBounds="true" preserveRatio="true" /> <ImageView fitHeight="97.8" fitWidth="70.05" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@img/dosCartesPersonnage.jpg" />
</image>
<VBox.margin>
<Insets bottom="5.0" />
</VBox.margin></ImageView>
<Button mnemonicParsing="false" styleClass="bouton" stylesheets="@style/plateau.css" text="%se.reveler" /> <Button mnemonicParsing="false" styleClass="bouton" stylesheets="@style/plateau.css" text="%se.reveler" />
</children> </children>
</VBox> </VBox>
@ -251,7 +288,7 @@
</VBox> </VBox>
</left> </left>
<right> <right>
<VBox alignment="CENTER_RIGHT" prefHeight="854.0" prefWidth="436.0" BorderPane.alignment="CENTER"> <VBox alignment="CENTER_RIGHT" prefHeight="864.0" prefWidth="444.0" BorderPane.alignment="CENTER">
<children> <children>
<VBox fx:id="joueur7" alignment="CENTER" prefHeight="285.0" prefWidth="445.0" rotate="270.0"> <VBox fx:id="joueur7" alignment="CENTER" prefHeight="285.0" prefWidth="445.0" rotate="270.0">
<children> <children>
@ -276,7 +313,13 @@
</VBox> </VBox>
<VBox alignment="CENTER" prefHeight="200.0" prefWidth="100.0"> <VBox alignment="CENTER" prefHeight="200.0" prefWidth="100.0">
<children> <children>
<ImageView fitHeight="97.8" fitWidth="70.05" pickOnBounds="true" preserveRatio="true" /> <ImageView fitHeight="97.8" fitWidth="70.05" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@img/dosCartesPersonnage.jpg" />
</image>
<VBox.margin>
<Insets bottom="5.0" />
</VBox.margin></ImageView>
<Button mnemonicParsing="false" styleClass="bouton" stylesheets="@style/plateau.css" text="%se.reveler" /> <Button mnemonicParsing="false" styleClass="bouton" stylesheets="@style/plateau.css" text="%se.reveler" />
</children> </children>
</VBox> </VBox>
@ -310,7 +353,13 @@
</VBox> </VBox>
<VBox alignment="CENTER" prefHeight="200.0" prefWidth="100.0"> <VBox alignment="CENTER" prefHeight="200.0" prefWidth="100.0">
<children> <children>
<ImageView fitHeight="97.8" fitWidth="70.05" pickOnBounds="true" preserveRatio="true" /> <ImageView fitHeight="97.8" fitWidth="70.05" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@img/dosCartesPersonnage.jpg" />
</image>
<VBox.margin>
<Insets bottom="5.0" />
</VBox.margin></ImageView>
<Button mnemonicParsing="false" styleClass="bouton" stylesheets="@style/plateau.css" text="%se.reveler" /> <Button mnemonicParsing="false" styleClass="bouton" stylesheets="@style/plateau.css" text="%se.reveler" />
</children> </children>
</VBox> </VBox>
@ -325,18 +374,24 @@
</VBox> </VBox>
</right> </right>
<center> <center>
<HBox alignment="CENTER" prefHeight="720.0" prefWidth="1036.0" BorderPane.alignment="CENTER"> <HBox alignment="CENTER" prefHeight="720.0" prefWidth="1078.0" BorderPane.alignment="CENTER">
<children> <children>
<VBox alignment="CENTER_LEFT" prefWidth="22.0"> <VBox alignment="CENTER_LEFT" prefWidth="22.0">
<children> <children>
<HBox prefHeight="100.0" prefWidth="200.0" styleClass="carteLumiere" stylesheets="@style/plateau.css"> <HBox prefHeight="100.0" prefWidth="200.0" styleClass="carteLumiere" stylesheets="@style/plateau.css">
<children> <children>
<ImageView fitHeight="97.8" fitWidth="70.05" pickOnBounds="true" preserveRatio="true" styleClass="background" /> <ImageView fitHeight="97.8" fitWidth="70.05" pickOnBounds="true" preserveRatio="true" styleClass="background">
<image>
<Image url="@img/dosCartesLumière.jpg" />
</image></ImageView>
</children> </children>
</HBox> </HBox>
<HBox prefHeight="100.0" prefWidth="200.0" styleClass="carteVision" stylesheets="@style/plateau.css"> <HBox prefHeight="100.0" prefWidth="200.0" styleClass="carteVision" stylesheets="@style/plateau.css">
<children> <children>
<ImageView fitHeight="97.8" fitWidth="70.05" pickOnBounds="true" preserveRatio="true" /> <ImageView fitHeight="97.8" fitWidth="70.05" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@img/dosCartesVision.jpg" />
</image></ImageView>
</children> </children>
<VBox.margin> <VBox.margin>
<Insets bottom="30.0" top="30.0" /> <Insets bottom="30.0" top="30.0" />
@ -344,14 +399,17 @@
</HBox> </HBox>
<HBox prefHeight="100.0" prefWidth="200.0" styleClass="carteTenebre" stylesheets="@style/plateau.css"> <HBox prefHeight="100.0" prefWidth="200.0" styleClass="carteTenebre" stylesheets="@style/plateau.css">
<children> <children>
<ImageView fitHeight="97.8" fitWidth="70.05" pickOnBounds="true" preserveRatio="true" /> <ImageView fitHeight="97.8" fitWidth="70.05" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@img/dosCartesNoires.jpg" />
</image></ImageView>
</children> </children>
</HBox> </HBox>
</children> </children>
</VBox> </VBox>
<VBox alignment="CENTER" prefHeight="496.0" prefWidth="739.0"> <VBox alignment="CENTER" prefHeight="496.0" prefWidth="739.0">
<children> <children>
<HBox alignment="TOP_CENTER" prefHeight="339.0" prefWidth="676.0"> <HBox fx:id="lieux" alignment="TOP_CENTER" prefHeight="339.0" prefWidth="676.0">
<children> <children>
<VBox alignment="CENTER" prefHeight="223.0" prefWidth="0.0"> <VBox alignment="CENTER" prefHeight="223.0" prefWidth="0.0">
<children> <children>
@ -410,7 +468,7 @@
</VBox> </VBox>
</children> </children>
</HBox> </HBox>
<VBox alignment="BOTTOM_CENTER" prefHeight="200.0" prefWidth="100.0"> <VBox alignment="BOTTOM_CENTER" prefHeight="200.0" prefWidth="771.0">
<children> <children>
<HBox alignment="CENTER_RIGHT" prefHeight="60.0" prefWidth="671.0"> <HBox alignment="CENTER_RIGHT" prefHeight="60.0" prefWidth="671.0">
<children> <children>
@ -442,7 +500,7 @@
</VBox> </VBox>
</children> </children>
</HBox> </HBox>
<HBox prefHeight="58.0" prefWidth="655.0"> <HBox fx:id="vie" prefHeight="58.0" prefWidth="655.0">
<children> <children>
<HBox prefHeight="100.0" prefWidth="0.0" /> <HBox prefHeight="100.0" prefWidth="0.0" />
<HBox alignment="CENTER" prefHeight="64.0" prefWidth="50.0" stylesheets="@style/plateau.css"> <HBox alignment="CENTER" prefHeight="64.0" prefWidth="50.0" stylesheets="@style/plateau.css">

View File

@ -1,585 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import java.lang.String?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.ScrollPane?>
<?import javafx.scene.image.Image?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.BorderPane?>
<?import javafx.scene.layout.ColumnConstraints?>
<?import javafx.scene.layout.GridPane?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.RowConstraints?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.shape.Circle?>
<AnchorPane prefHeight="976.0" prefWidth="1198.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ihm.controller.PlateauControllerTest">
<children>
<BorderPane fx:id="root" styleClass="background" stylesheets="@style/plateau.css" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<center>
<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" BorderPane.alignment="CENTER">
<children>
<HBox alignment="CENTER" spacing="10.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<children>
<VBox alignment="CENTER" prefWidth="22.0" HBox.hgrow="NEVER">
<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" styleClass="background" />
</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>
<VBox alignment="CENTER" HBox.hgrow="NEVER">
<children>
<HBox alignment="TOP_CENTER">
<children>
<VBox alignment="CENTER">
<children>
<Circle fill="#ff1f1f" radius="10.0" stroke="BLACK" strokeType="INSIDE" />
<Circle fill="#ffd71f" radius="10.0" stroke="BLACK" strokeType="INSIDE" />
<Circle fill="#ecff1f" radius="10.0" stroke="BLACK" strokeType="INSIDE" />
<Circle fill="#64ff1f" radius="10.0" stroke="BLACK" strokeType="INSIDE" />
</children>
</VBox>
<HBox alignment="TOP_CENTER" styleClass="lieux" stylesheets="@style/plateau.css">
<children>
<ImageView fitHeight="132.03" fitWidth="94.5675" pickOnBounds="true" preserveRatio="true" />
<ImageView fitHeight="132.03" fitWidth="94.5675" pickOnBounds="true" preserveRatio="true">
<HBox.margin>
<Insets left="5.0" />
</HBox.margin>
</ImageView>
</children>
<HBox.margin>
<Insets left="10.0" />
</HBox.margin>
</HBox>
<HBox alignment="BOTTOM_CENTER" styleClass="lieux" stylesheets="@style/plateau.css">
<children>
<ImageView fitHeight="132.03" fitWidth="94.5675" pickOnBounds="true" preserveRatio="true" />
<ImageView fitHeight="132.03" fitWidth="94.5675" pickOnBounds="true" preserveRatio="true">
<HBox.margin>
<Insets left="5.0" />
</HBox.margin>
</ImageView>
</children>
<HBox.margin>
<Insets left="5.0" />
</HBox.margin>
</HBox>
<HBox alignment="TOP_CENTER" styleClass="lieux" stylesheets="@style/plateau.css">
<children>
<ImageView fitHeight="132.03" fitWidth="94.5675" pickOnBounds="true" preserveRatio="true" />
<ImageView fitHeight="132.03" fitWidth="94.5675" pickOnBounds="true" preserveRatio="true">
<HBox.margin>
<Insets left="5.0" />
</HBox.margin>
</ImageView>
</children>
<HBox.margin>
<Insets left="5.0" right="10.0" />
</HBox.margin>
</HBox>
<VBox alignment="CENTER">
<children>
<Circle fill="#21ffee" radius="10.0" stroke="BLACK" strokeType="INSIDE" />
<Circle fill="#2168ff" radius="10.0" stroke="BLACK" strokeType="INSIDE" />
<Circle fill="#d921ff" radius="10.0" stroke="BLACK" strokeType="INSIDE" />
<Circle fill="#ff21ad" radius="10.0" stroke="BLACK" strokeType="INSIDE" />
</children>
</VBox>
</children>
</HBox>
<VBox alignment="BOTTOM_CENTER">
<children>
<HBox alignment="CENTER_RIGHT">
<children>
<Label alignment="CENTER" contentDisplay="CENTER" styleClass="text" stylesheets="@style/plateau.css" text="Allie" />
<VBox alignment="CENTER">
<children>
<Label styleClass="text" stylesheets="@style/plateau.css" text="Bob" />
<Label styleClass="text" stylesheets="@style/plateau.css" text="Emi" />
</children>
</VBox>
<VBox alignment="CENTER">
<children>
<Label styleClass="text" stylesheets="@style/plateau.css" text="Inconnu" />
<Label styleClass="text" stylesheets="@style/plateau.css" text="Charles" />
</children>
</VBox>
<Label alignment="CENTER" contentDisplay="CENTER" styleClass="text" stylesheets="@style/plateau.css" text="Franklin" />
<VBox alignment="CENTER">
<children>
<Label styleClass="text" stylesheets="@style/plateau.css" text="Vampire" />
<Label styleClass="text" stylesheets="@style/plateau.css" text="Daniel" />
</children>
</VBox>
<VBox alignment="CENTER">
<children>
<Label styleClass="text" stylesheets="@style/plateau.css" text="Loup-" />
<Label styleClass="text" stylesheets="@style/plateau.css" text="garou" />
<Label styleClass="text" stylesheets="@style/plateau.css" text="George" />
</children>
</VBox>
</children>
</HBox>
<HBox>
<children>
<HBox prefHeight="100.0" prefWidth="0.0" />
<HBox alignment="CENTER" prefHeight="64.0" prefWidth="50.0" stylesheets="@style/plateau.css">
<children>
<VBox prefHeight="87.0" prefWidth="2.0">
<children>
<Circle fill="#ff1f1f" radius="8.0" stroke="BLACK" strokeType="INSIDE" />
<Circle fill="#ffd71f" radius="8.0" stroke="BLACK" strokeType="INSIDE" />
<Circle fill="#ecff1f" radius="8.0" stroke="BLACK" strokeType="INSIDE" />
<Circle fill="#64ff1f" radius="8.0" stroke="BLACK" strokeType="INSIDE" />
</children>
</VBox>
<VBox prefHeight="87.0" prefWidth="4.0">
<children>
<Circle fill="#21ffee" radius="8.0" stroke="BLACK" strokeType="INSIDE" />
<Circle fill="#2168ff" radius="8.0" stroke="BLACK" strokeType="INSIDE" />
<Circle fill="#d921ff" radius="8.0" stroke="BLACK" strokeType="INSIDE" />
<Circle fill="#ff21ad" radius="8.0" stroke="BLACK" strokeType="INSIDE" />
</children>
</VBox>
</children>
<styleClass>
<String fx:value="barreDeVie" />
<String fx:value="zero" />
</styleClass>
</HBox>
<HBox prefHeight="100.0" prefWidth="50.0" stylesheets="@style/plateau.css">
<children>
<VBox prefHeight="64.0" prefWidth="25.0" />
<VBox prefHeight="200.0" prefWidth="25.0" />
</children>
<styleClass>
<String fx:value="barreDeVie" />
<String fx:value="un" />
</styleClass>
</HBox>
<HBox prefHeight="100.0" prefWidth="50.0" stylesheets="@style/plateau.css">
<children>
<VBox prefHeight="64.0" prefWidth="25.0" />
<VBox prefHeight="200.0" prefWidth="25.0" />
</children>
<styleClass>
<String fx:value="barreDeVie" />
<String fx:value="deux" />
</styleClass>
</HBox>
<HBox prefHeight="100.0" prefWidth="50.0" stylesheets="@style/plateau.css">
<children>
<VBox prefHeight="64.0" prefWidth="25.0" />
<VBox prefHeight="200.0" prefWidth="25.0" />
</children>
<styleClass>
<String fx:value="barreDeVie" />
<String fx:value="trois" />
</styleClass>
</HBox>
<HBox prefHeight="100.0" prefWidth="50.0" stylesheets="@style/plateau.css">
<children>
<VBox prefHeight="64.0" prefWidth="25.0" />
<VBox prefHeight="200.0" prefWidth="25.0" />
</children>
<styleClass>
<String fx:value="barreDeVie" />
<String fx:value="quatre" />
</styleClass>
</HBox>
<HBox prefHeight="100.0" prefWidth="50.0" styleClass="barreDeVie" stylesheets="@style/plateau.css">
<children>
<VBox prefHeight="64.0" prefWidth="25.0" />
<VBox prefHeight="200.0" prefWidth="25.0" />
</children>
</HBox>
<HBox prefHeight="100.0" prefWidth="50.0" styleClass="barreDeVie" stylesheets="@style/plateau.css">
<children>
<VBox prefHeight="64.0" prefWidth="25.0" />
<VBox prefHeight="200.0" prefWidth="25.0" />
</children>
</HBox>
<HBox prefHeight="100.0" prefWidth="50.0" styleClass="barreDeVie" stylesheets="@style/plateau.css">
<children>
<VBox prefHeight="64.0" prefWidth="25.0" />
<VBox prefHeight="200.0" prefWidth="25.0" />
</children>
</HBox>
<HBox prefHeight="100.0" prefWidth="50.0" styleClass="barreDeVie" stylesheets="@style/plateau.css">
<children>
<VBox prefHeight="64.0" prefWidth="25.0" />
<VBox prefHeight="200.0" prefWidth="25.0" />
</children>
</HBox>
<HBox prefHeight="100.0" prefWidth="50.0" styleClass="barreDeVie" stylesheets="@style/plateau.css">
<children>
<VBox prefHeight="64.0" prefWidth="25.0" />
<VBox prefHeight="200.0" prefWidth="25.0" />
</children>
</HBox>
<HBox prefHeight="100.0" prefWidth="50.0" styleClass="barreDeVie" stylesheets="@style/plateau.css">
<children>
<VBox prefHeight="64.0" prefWidth="25.0" />
<VBox prefHeight="200.0" prefWidth="25.0" />
</children>
</HBox>
<HBox prefHeight="100.0" prefWidth="50.0" styleClass="barreDeVie" stylesheets="@style/plateau.css">
<children>
<VBox prefHeight="64.0" prefWidth="25.0" />
<VBox prefHeight="200.0" prefWidth="25.0" />
</children>
</HBox>
<HBox prefHeight="100.0" prefWidth="50.0" styleClass="barreDeVie" stylesheets="@style/plateau.css">
<children>
<VBox prefHeight="64.0" prefWidth="25.0" />
<VBox prefHeight="200.0" prefWidth="25.0" />
</children>
</HBox>
<HBox prefHeight="100.0" prefWidth="50.0" styleClass="barreDeVie" stylesheets="@style/plateau.css">
<children>
<VBox prefHeight="64.0" prefWidth="25.0" />
<VBox prefHeight="200.0" prefWidth="25.0" />
</children>
</HBox>
</children>
</HBox>
<HBox>
<children>
<VBox>
<children>
<Label styleClass="text" stylesheets="@style/plateau.css" text="Pas de" />
<Label styleClass="text" stylesheets="@style/plateau.css" text="dégats" />
</children>
</VBox>
<Label alignment="CENTER" prefWidth="50.0" styleClass="text" stylesheets="@style/plateau.css" text="1" />
<Label alignment="CENTER" prefWidth="50.0" styleClass="text" stylesheets="@style/plateau.css" text="2" textAlignment="CENTER" />
<Label alignment="CENTER" prefWidth="50.0" styleClass="text" stylesheets="@style/plateau.css" text="3" textAlignment="CENTER" />
<Label alignment="CENTER" prefWidth="50.0" styleClass="text" stylesheets="@style/plateau.css" text="4" textAlignment="CENTER" />
<Label alignment="CENTER" prefWidth="50.0" styleClass="text" stylesheets="@style/plateau.css" text="5" textAlignment="CENTER" />
<Label alignment="CENTER" prefWidth="50.0" styleClass="text" stylesheets="@style/plateau.css" text="6" textAlignment="CENTER" />
<Label alignment="CENTER" prefWidth="50.0" styleClass="text" stylesheets="@style/plateau.css" text="7" textAlignment="CENTER" />
<Label alignment="CENTER" prefWidth="50.0" styleClass="text" stylesheets="@style/plateau.css" text="8" textAlignment="CENTER" />
<Label alignment="CENTER" prefWidth="50.0" styleClass="text" stylesheets="@style/plateau.css" text="9" textAlignment="CENTER" />
<Label alignment="CENTER" prefWidth="50.0" styleClass="text" stylesheets="@style/plateau.css" text="10" textAlignment="CENTER" />
<Label alignment="CENTER" prefWidth="50.0" styleClass="text" stylesheets="@style/plateau.css" text="11" textAlignment="CENTER" />
<Label alignment="CENTER" prefWidth="50.0" styleClass="text" stylesheets="@style/plateau.css" text="12" textAlignment="CENTER" />
<Label alignment="CENTER" prefWidth="50.0" styleClass="text" stylesheets="@style/plateau.css" text="13" textAlignment="CENTER" />
<Label alignment="CENTER" prefWidth="50.0" styleClass="text" stylesheets="@style/plateau.css" text="14" textAlignment="CENTER" />
</children>
</HBox>
</children>
</VBox>
</children>
</VBox>
</children>
<padding>
<Insets bottom="20.0" left="20.0" right="20.0" top="20.0" />
</padding>
</HBox>
</children>
</AnchorPane>
</center>
<right>
<AnchorPane maxWidth="1.7976931348623157E308" minWidth="-Infinity" BorderPane.alignment="CENTER">
<children>
<GridPane alignment="CENTER" maxWidth="1.7976931348623157E308" minWidth="-Infinity" style="-fx-background-color: A50000;" vgap="50.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints vgrow="ALWAYS" />
<RowConstraints vgrow="ALWAYS" />
</rowConstraints>
<children>
<GridPane vgap="10.0">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" />
</columnConstraints>
<rowConstraints>
<RowConstraints vgrow="ALWAYS" />
<RowConstraints />
<RowConstraints vgrow="ALWAYS" />
</rowConstraints>
<children>
<AnchorPane fx:id="anchorPane612" />
<ImageView fitHeight="150.0" fitWidth="150.0" pickOnBounds="true" preserveRatio="true" GridPane.rowIndex="1">
<image>
<Image url="@img/dosCartesPersonnageRot.jpg" />
</image>
</ImageView>
<ScrollPane hbarPolicy="NEVER" vbarPolicy="NEVER" GridPane.rowIndex="2">
<content>
<AnchorPane />
</content>
</ScrollPane>
</children>
<GridPane.margin>
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
</GridPane.margin>
</GridPane>
<GridPane layoutX="10.0" layoutY="10.0" vgap="10.0" GridPane.rowIndex="1">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints vgrow="ALWAYS" />
<RowConstraints />
<RowConstraints vgrow="ALWAYS" />
</rowConstraints>
<children>
<AnchorPane fx:id="anchorPane6121" GridPane.rowIndex="2" />
<ImageView fitHeight="150.0" fitWidth="150.0" pickOnBounds="true" preserveRatio="true" GridPane.rowIndex="1">
<image>
<Image url="@img/dosCartesPersonnageRot.jpg" />
</image>
</ImageView>
<ScrollPane hbarPolicy="NEVER" vbarPolicy="NEVER">
<content>
<AnchorPane />
</content>
</ScrollPane>
</children>
<GridPane.margin>
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
</GridPane.margin>
</GridPane>
</children>
<padding>
<Insets bottom="20.0" left="20.0" right="20.0" top="20.0" />
</padding>
</GridPane>
</children>
</AnchorPane>
</right>
<left>
<AnchorPane BorderPane.alignment="CENTER">
<children>
<GridPane alignment="CENTER" style="-fx-background-color: A50000;" vgap="50.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<rowConstraints>
<RowConstraints vgrow="SOMETIMES" />
<RowConstraints vgrow="SOMETIMES" />
</rowConstraints>
<children>
<GridPane vgap="10.0">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints vgrow="ALWAYS" />
<RowConstraints />
<RowConstraints vgrow="ALWAYS" />
</rowConstraints>
<children>
<AnchorPane nodeOrientation="RIGHT_TO_LEFT" />
<ImageView fitHeight="150.0" fitWidth="150.0" pickOnBounds="true" preserveRatio="true" GridPane.rowIndex="1">
<image>
<Image url="@img/dosCartesPersonnageRot.jpg" />
</image>
</ImageView>
<ScrollPane hbarPolicy="NEVER" vbarPolicy="NEVER" GridPane.rowIndex="2">
<content>
<AnchorPane />
</content>
</ScrollPane>
</children>
<GridPane.margin>
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
</GridPane.margin>
</GridPane>
<GridPane layoutX="10.0" layoutY="10.0" vgap="10.0" GridPane.rowIndex="1">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints vgrow="ALWAYS" />
<RowConstraints />
<RowConstraints vgrow="ALWAYS" />
</rowConstraints>
<children>
<AnchorPane GridPane.rowIndex="2" />
<ImageView fitHeight="150.0" fitWidth="150.0" pickOnBounds="true" preserveRatio="true" GridPane.rowIndex="1">
<image>
<Image url="@img/dosCartesPersonnageRot.jpg" />
</image>
</ImageView>
<ScrollPane hbarPolicy="NEVER" vbarPolicy="NEVER">
<content>
<AnchorPane />
</content>
</ScrollPane>
</children>
<GridPane.margin>
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
</GridPane.margin>
</GridPane>
</children>
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" />
</columnConstraints>
<padding>
<Insets bottom="20.0" left="20.0" right="20.0" top="20.0" />
</padding>
</GridPane>
</children>
</AnchorPane>
</left>
<top>
<AnchorPane BorderPane.alignment="CENTER">
<children>
<GridPane alignment="CENTER" hgap="50.0" style="-fx-background-color: A50000;" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<columnConstraints>
<ColumnConstraints hgrow="ALWAYS" />
<ColumnConstraints hgrow="ALWAYS" />
</columnConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<GridPane alignment="CENTER" hgap="10.0" rotate="180.0">
<columnConstraints>
<ColumnConstraints hgrow="ALWAYS" />
<ColumnConstraints />
<ColumnConstraints hgrow="ALWAYS" />
</columnConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<AnchorPane nodeOrientation="RIGHT_TO_LEFT" GridPane.columnIndex="2" />
<ImageView fitHeight="150.0" fitWidth="200.0" pickOnBounds="true" preserveRatio="true" GridPane.columnIndex="1" GridPane.halignment="CENTER">
<image>
<Image url="@img/dosCartesPersonnage.jpg" />
</image>
</ImageView>
<ScrollPane hbarPolicy="NEVER" vbarPolicy="NEVER">
<content>
<AnchorPane />
</content>
</ScrollPane>
</children>
</GridPane>
<GridPane alignment="CENTER" hgap="10.0" rotate="180.0" GridPane.columnIndex="1">
<columnConstraints>
<ColumnConstraints hgrow="ALWAYS" />
<ColumnConstraints />
<ColumnConstraints hgrow="ALWAYS" />
</columnConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<AnchorPane />
<ImageView fitHeight="150.0" fitWidth="200.0" pickOnBounds="true" preserveRatio="true" GridPane.columnIndex="1" GridPane.halignment="CENTER">
<image>
<Image url="@img/dosCartesPersonnage.jpg" />
</image>
<GridPane.margin>
<Insets />
</GridPane.margin>
</ImageView>
<ScrollPane hbarPolicy="NEVER" vbarPolicy="NEVER" GridPane.columnIndex="2">
<content>
<AnchorPane />
</content>
</ScrollPane>
</children>
</GridPane>
</children>
<padding>
<Insets bottom="20.0" left="20.0" right="20.0" top="20.0" />
</padding>
</GridPane>
</children>
</AnchorPane>
</top>
<bottom>
<AnchorPane BorderPane.alignment="CENTER">
<children>
<GridPane alignment="CENTER" hgap="50.0" style="-fx-background-color: A50000;" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<columnConstraints>
<ColumnConstraints hgrow="ALWAYS" />
<ColumnConstraints hgrow="ALWAYS" />
</columnConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<GridPane alignment="CENTER" hgap="10.0">
<columnConstraints>
<ColumnConstraints hgrow="ALWAYS" />
<ColumnConstraints />
<ColumnConstraints hgrow="ALWAYS" />
</columnConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<AnchorPane />
<ImageView fitHeight="150.0" fitWidth="200.0" pickOnBounds="true" preserveRatio="true" GridPane.columnIndex="1" GridPane.halignment="CENTER">
<image>
<Image url="@img/dosCartesPersonnage.jpg" />
</image>
</ImageView>
<ScrollPane fitToHeight="true" fitToWidth="true" hbarPolicy="NEVER" vbarPolicy="NEVER" GridPane.columnIndex="2">
<content>
<AnchorPane />
</content>
</ScrollPane>
</children>
</GridPane>
<GridPane alignment="CENTER" hgap="10.0" GridPane.columnIndex="1">
<columnConstraints>
<ColumnConstraints hgrow="ALWAYS" />
<ColumnConstraints />
<ColumnConstraints hgrow="ALWAYS" />
</columnConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<AnchorPane nodeOrientation="RIGHT_TO_LEFT" GridPane.columnIndex="2" />
<ImageView fitHeight="150.0" fitWidth="200.0" pickOnBounds="true" preserveRatio="true" GridPane.columnIndex="1" GridPane.halignment="CENTER">
<image>
<Image url="@img/dosCartesPersonnage.jpg" />
</image>
<GridPane.margin>
<Insets />
</GridPane.margin>
</ImageView>
<ScrollPane fitToHeight="true" fitToWidth="true" hbarPolicy="NEVER" vbarPolicy="NEVER">
<content>
<AnchorPane />
</content>
</ScrollPane>
</children>
</GridPane>
</children>
<padding>
<Insets bottom="20.0" left="20.0" right="20.0" top="20.0" />
</padding>
</GridPane>
</children>
</AnchorPane>
</bottom>
</BorderPane>
</children>
</AnchorPane>

View File

@ -1,34 +0,0 @@
<?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.text.Font?>
<Pane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="638.0" prefWidth="951.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1">
<children>
<Button layoutX="73.0" layoutY="33.0" mnemonicParsing="false" prefHeight="55.0" prefWidth="156.0" text="%joueur1" />
<Button layoutX="298.0" layoutY="33.0" mnemonicParsing="false" prefHeight="55.0" prefWidth="156.0" text="%joueur2" />
<Button layoutX="515.0" layoutY="33.0" mnemonicParsing="false" prefHeight="55.0" prefWidth="156.0" text="%joueur3" />
<Button layoutX="745.0" layoutY="33.0" mnemonicParsing="false" prefHeight="55.0" prefWidth="156.0" text="%joueur4" />
<Button layoutX="73.0" layoutY="510.0" mnemonicParsing="false" prefHeight="55.0" prefWidth="156.0" text="%joueur5" />
<Button layoutX="298.0" layoutY="510.0" mnemonicParsing="false" prefHeight="55.0" prefWidth="156.0" text="%joueur6" />
<Button layoutX="515.0" layoutY="510.0" mnemonicParsing="false" prefHeight="55.0" prefWidth="156.0" text="%joueur7" />
<Button layoutX="745.0" layoutY="510.0" mnemonicParsing="false" prefHeight="55.0" prefWidth="156.0" text="%joueur8" />
<Button layoutX="177.0" layoutY="134.0" mnemonicParsing="false" prefHeight="327.0" prefWidth="194.0" text="%premier.secours">
<font>
<Font size="23.0" />
</font>
</Button>
<Label layoutX="524.0" layoutY="134.0" prefHeight="105.0" prefWidth="254.0" text="%effet.carte">
<font>
<Font size="37.0" />
</font>
</Label>
<Label layoutX="438.0" layoutY="306.0" prefHeight="115.0" prefWidth="385.0" text="%choisr.joueur" wrapText="true">
<font>
<Font size="35.0" />
</font>
</Label>
</children>
</Pane>

View File

@ -1,63 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.ScrollPane?>
<?import javafx.scene.control.SplitPane?>
<?import javafx.scene.image.Image?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.HBox?>
<AnchorPane xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ihm.controller.ScrollPaneJoueurController">
<children>
<SplitPane dividerPositions="0.298" prefHeight="155.0" prefWidth="368.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<items>
<AnchorPane>
<children>
<ScrollPane hbarPolicy="NEVER" vbarPolicy="NEVER" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<content>
<AnchorPane>
<children>
<HBox spacing="10.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<children>
<ImageView fitHeight="150.0" fitWidth="200.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@img/dosCartesPersonnage.jpg" />
</image>
</ImageView>
<ImageView fitHeight="150.0" fitWidth="200.0" layoutX="10.0" layoutY="10.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@img/dosCartesPersonnage.jpg" />
</image>
</ImageView>
<ImageView fitHeight="150.0" fitWidth="200.0" layoutX="115.0" layoutY="10.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@img/dosCartesPersonnage.jpg" />
</image>
</ImageView>
<ImageView fitHeight="150.0" fitWidth="200.0" layoutX="219.0" layoutY="10.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@img/dosCartesPersonnage.jpg" />
</image>
</ImageView>
</children>
</HBox>
</children>
</AnchorPane>
</content>
</ScrollPane>
</children>
</AnchorPane>
<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity">
<children>
<ImageView fitHeight="30.0" focusTraversable="true" nodeOrientation="INHERIT" onMousePressed="#changeZoneJoueurToMenuJoueur" pickOnBounds="true" preserveRatio="true" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<image>
<Image url="@img/backButton.png" />
</image>
</ImageView>
</children>
</AnchorPane>
</items>
</SplitPane>
</children>
</AnchorPane>

View File

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.image.Image?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.BorderPane?>
<BorderPane prefHeight="241.0" prefWidth="212.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1">
<top>
<ImageView fitHeight="34.0" fitWidth="32.0" onMousePressed="#scrollPaneJoueurs" pickOnBounds="true" preserveRatio="true" BorderPane.alignment="CENTER">
<image>
<Image url="@img/menuButton.png" />
</image>
</ImageView>
</top>
</BorderPane>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 128 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 146 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

View File

@ -1,34 +0,0 @@
<?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="%au.tour.de">
<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.de.des" />
<Label layoutX="275.0" layoutY="222.0" text="%score.des.1">
<font>
<Font size="18.0" />
</font></Label>
<Label layoutX="516.0" layoutY="249.0" text="%score.des.2">
<font>
<Font size="18.0" />
</font></Label>
<Label layoutX="535.0" layoutY="29.0" text="%joueur1">
<font>
<Font size="36.0" />
</font>
</Label>
</children>
</Pane>

View File

@ -1,22 +0,0 @@
<?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.Rectangle?>
<?import javafx.scene.text.Font?>
<Pane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="534.0" prefWidth="714.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1">
<children>
<Label layoutX="355.0" layoutY="172.0" text="%description.capacite.carte.lieux">
<font>
<Font size="18.0" />
</font>
</Label>
<Rectangle arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="268.0" layoutX="96.0" layoutY="147.0" stroke="BLACK" strokeType="INSIDE" width="200.0" />
<Button layoutX="348.0" layoutY="242.0" mnemonicParsing="false" text="%utiliser.capaciter.lieux" />
<Button layoutX="542.0" layoutY="242.0" mnemonicParsing="false" text="%sauter.etape" />
<Label layoutX="168.0" layoutY="273.0" text="%carte.lieux" />
</children>
</Pane>

View File

@ -1,35 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.Pane?>
<?import javafx.scene.text.Font?>
<Pane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="451.0" prefWidth="654.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1">
<children>
<HBox alignment="CENTER" prefHeight="100.0" prefWidth="661.0" spacing="60.0">
<children>
<Button mnemonicParsing="false" text="%joueur1" />
<Button mnemonicParsing="false" text="%joueur2" />
<Button mnemonicParsing="false" text="%joueur3" />
<Button mnemonicParsing="false" text="%joueur4" />
</children>
</HBox>
<Label layoutX="196.0" layoutY="158.0" text="%attaquer.joueur">
<font>
<Font size="24.0" />
</font>
</Label>
<Button layoutX="277.0" layoutY="213.0" mnemonicParsing="false" text="%ne.pas.attaqur" />
<HBox alignment="CENTER" layoutY="337.0" prefHeight="100.0" prefWidth="661.0" spacing="60.0">
<children>
<Button mnemonicParsing="false" text="%joueur5" />
<Button mnemonicParsing="false" text="%joueur6" />
<Button mnemonicParsing="false" text="%joueur7" />
<Button mnemonicParsing="false" text="%joueur8" />
</children>
</HBox>
</children>
</Pane>

View File

@ -1,39 +0,0 @@
<?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="401.0" layoutY="29.0" text="attaque">
<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.de.des" />
<Label layoutX="275.0" layoutY="222.0" text="%score.des.1">
<font>
<Font size="18.0" />
</font></Label>
<Label layoutX="516.0" layoutY="249.0" text="%score.des.2">
<font>
<Font size="18.0" />
</font></Label>
<Label layoutX="535.0" layoutY="29.0" text="%joueur2">
<font>
<Font size="36.0" />
</font>
</Label>
<Label layoutX="253.0" layoutY="29.0" text="%joueur1">
<font>
<Font size="36.0" />
</font>
</Label>
</children>
</Pane>

View File

@ -1,30 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.Pane?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.text.Font?>
<Pane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="419.0" prefWidth="614.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1">
<children>
<HBox alignment="CENTER" layoutX="97.0" layoutY="49.0" prefHeight="340.0" prefWidth="489.0" spacing="60.0">
<children>
<Label text="%piocher.carte">
<font>
<Font size="18.0" />
</font>
</Label>
<VBox alignment="CENTER" prefHeight="200.0" prefWidth="100.0" spacing="60.0">
<children>
<Button mnemonicParsing="false" text="%carte.vision" />
<Button mnemonicParsing="false" text="%carte.tenebre" />
<Button mnemonicParsing="false" text="%carte.lumiere" />
</children>
</VBox>
</children>
</HBox>
</children>
</Pane>

View File

@ -1,35 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.Pane?>
<?import javafx.scene.text.Font?>
<Pane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="451.0" prefWidth="654.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1">
<children>
<HBox alignment="CENTER" prefHeight="100.0" prefWidth="661.0" spacing="60.0">
<children>
<Button mnemonicParsing="false" text="%joueur1" />
<Button mnemonicParsing="false" text="%joueur2" />
<Button mnemonicParsing="false" text="%joueur3" />
<Button mnemonicParsing="false" text="%joueur4" />
</children>
</HBox>
<Label layoutX="85.0" layoutY="163.0" text="%attaquer.ou.soigner">
<font>
<Font size="24.0" />
</font>
</Label>
<Button layoutX="277.0" layoutY="213.0" mnemonicParsing="false" text="%ne.pas.attaqur" />
<HBox alignment="CENTER" layoutY="337.0" prefHeight="100.0" prefWidth="661.0" spacing="60.0">
<children>
<Button mnemonicParsing="false" text="%joueur5" />
<Button mnemonicParsing="false" text="%joueur6" />
<Button mnemonicParsing="false" text="%joueur7" />
<Button mnemonicParsing="false" text="%joueur8" />
</children>
</HBox>
</children>
</Pane>

10
src/main/Contexte.java Normal file
View File

@ -0,0 +1,10 @@
package main;
public enum Contexte {
ATTAQUER,
VOLER_EQUIP,
EFFET_NEGATIF_SUR_AUTRES,
EFFET_POSITIF_SUR_AUTRES
}

View File

@ -68,6 +68,20 @@ public class ControleurIA {
return res; return res;
} }
public static List<Joueur> getAmisJoueurs(JoueurVirtuel jIA, List<Joueur> joueursLieu) {
List<Joueur> res = new ArrayList<>();
Equipe equipejIA = jIA.getEquipe();
if (equipejIA == CartePersonnage.Equipe.NEUTRE)
res = joueursLieu;
else {
for (Joueur j : joueursLieu) {
if (equipejIA.equals(j.getEquipe()))
res.add(j);
}
}
return res;
}
// loup-garou : si attaquee par joueur pas du meme camps 60%? devoilement // loup-garou : si attaquee par joueur pas du meme camps 60%? devoilement
public boolean devoilerIALoupGarou(JoueurVirtuel jIA, Joueur jAttaquant) { public boolean devoilerIALoupGarou(JoueurVirtuel jIA, Joueur jAttaquant) {
Equipe equipejIA = jIA.getEquipe(); Equipe equipejIA = jIA.getEquipe();

View File

@ -14,8 +14,10 @@ public class GestionnaireJeu {
private View view; private View view;
private static Plateau plateau; private Map<Integer, Joueur> mapJoueurs;
private static PlateauController pc;
private Plateau plateau;
private PlateauController pc;
private GestionnaireJeu() {} private GestionnaireJeu() {}
@ -31,8 +33,8 @@ public class GestionnaireJeu {
return plateau; return plateau;
} }
public static void lancerPartie() { public void lancerPartie() {
plateau.jeu(); this.plateau.jeu();
} }
public void jouer(Configuration c) { public void jouer(Configuration c) {
@ -73,24 +75,32 @@ public class GestionnaireJeu {
} }
public static void setConfiguration(Configuration c) { public void setConfiguration(Configuration c) {
List<Joueur> joueurs = new ArrayList<Joueur>(); Map<Integer, Joueur> mapJoueurs = convertConfiguration(c);
this.mapJoueurs = mapJoueurs;
for(Joueur j : c.toJoueurs().values()) { List<Joueur> joueurs = new ArrayList();
for(Joueur j : mapJoueurs.values()) {
joueurs.add(j); joueurs.add(j);
} }
plateau = new Plateau(joueurs); this.plateau = new Plateau(joueurs);
} }
public static Map<Integer, Joueur> getJoueursMap(Configuration c) { public Map<Integer, Joueur> convertConfiguration(Configuration c) {
return c.toJoueurs(); return c.toJoueurs();
} }
public static void setPlateauController(PlateauController pc2) { public Map<Integer, Joueur> getMapJoueurs() {
pc = pc2; return this.mapJoueurs;
}
public void setPlateauController(PlateauController pc2) {
this.pc = pc2;
} }
} }

View File

@ -1,4 +1,5 @@
package main; package main;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -6,45 +7,106 @@ import carte.Equipement;
import carte.EquipementStat; import carte.EquipementStat;
import effet.Effet; import effet.Effet;
public class JoueurVirtuel extends Joueur { public class JoueurVirtuel extends Joueur {
private int nvDifficulte = 1; //possibilite de 1, 2 ou 3 private int nvDifficulte = 1; // possibilite de 1, 2 ou 3
public JoueurVirtuel (String name) { public JoueurVirtuel(String name) {
super(name); super(name);
} }
public Effet choisirEffet(List<Effet> effets) { public Effet choisirEffet(List<Effet> effets) {
return effets.get((int)Math.floor(Math.random() * effets.size())); return effets.get((int) Math.floor(Math.random() * effets.size()));
} }
//on privilegie les equipements qui donnent des stats // on privilegie les equipements qui donnent des stats
public Equipement choisirEquipement(List<Equipement> equips) { public Equipement choisirEquipement(List<Equipement> equips) {
List<Equipement> equipstat = trouverEquipStat(equips); List<Equipement> equipstat = trouverEquipStat(equips);
if(equipstat.size()>0) if (equipstat.size() > 0)
return equipstat.get((int)Math.floor(Math.random() * equipstat.size())); return equipstat.get((int) Math.floor(Math.random() * equipstat.size()));
return equips.get((int)Math.floor(Math.random() * equips.size())); return equips.get((int) Math.floor(Math.random() * equips.size()));
} }
public List<Equipement> trouverEquipStat(List<Equipement> equips){ public List<Equipement> trouverEquipStat(List<Equipement> equips) {
List<Equipement> res = new ArrayList<>(); List<Equipement> res = new ArrayList<>();
for(Equipement e : equips) { for (Equipement e : equips) {
if(e instanceof EquipementStat) if (e instanceof EquipementStat)
res.add(e); res.add(e);
} }
return res; return res;
} }
//on choisit les joueurs avec les moins de hp, on ne distingue pas cependant d'amie ou ennemi public Joueur choisirJoueur(List<Joueur> joueurs, Contexte c) {
public Joueur choisirJoueur(List<Joueur> joueurs) { Joueur res;
Joueur res = joueurs.get(0); switch (c) {
for(int i=1; i<joueurs.size();i++) { case ATTAQUER:
if(res.getStat("HP")>joueurs.get(i).getStat("HP")) res = choisirJoueurEnnemi(joueurs);
res = joueurs.get(i); break;
case VOLER_EQUIP:
res = choisirJoueurAVoler(joueurs);
break;
case EFFET_NEGATIF_SUR_AUTRES:
res = choisirJoueurEnnemi(joueurs);
break;
case EFFET_POSITIF_SUR_AUTRES:
res = choisirJoueurAmi(joueurs);
break;
default:
res = null; // faire exception?
} }
return res; return res;
//return joueurs.get((int)Math.floor(Math.random() * joueurs.size())); }
// on choisit les joueurs avec les moins de hp, on met en priorite les ennemis
public Joueur choisirJoueurEnnemi(List<Joueur> joueurs) {
List<Joueur> resliste;
List<Joueur> ennemis = ControleurIA.getEnnemisJoueurs(this, joueurs);
if (ennemis.size() > 0)
resliste = ennemis;
else
resliste = joueurs;
Joueur res = resliste.get(0);
for (int i = 1; i < resliste.size(); i++) {
if (res.getStat("HP") > resliste.get(i).getStat("HP"))
res = resliste.get(i);
}
return res;
// return joueurs.get((int)Math.floor(Math.random() * joueurs.size()));
}
// on choisit les joueurs avec le plus d'equipements, on met en priorite les
// ennemis
public Joueur choisirJoueurAVoler(List<Joueur> joueurs) {
List<Joueur> resliste;
List<Joueur> ennemis = ControleurIA.getEnnemisJoueurs(this, joueurs);
if (ennemis.size() > 0)
resliste = ennemis;
else
resliste = joueurs;
Joueur res = resliste.get(0);
for (int i = 1; i < resliste.size(); i++) {
if (res.getStat("nb_equipements") > resliste.get(i).getStat("nb_equipements"))
res = resliste.get(i);
}
return res;
}
// on choisit les joueurs avec les moins de hp, on met en priorite les amis (ex:
// pour les soigner?)
public Joueur choisirJoueurAmi(List<Joueur> joueurs) {
List<Joueur> resliste;
List<Joueur> ennemis = ControleurIA.getAmisJoueurs(this, joueurs);
if (ennemis.size() > 0)
resliste = ennemis;
else
resliste = joueurs;
Joueur res = resliste.get(0);
for (int i = 1; i < resliste.size(); i++) {
if (res.getStat("HP") > resliste.get(i).getStat("HP"))
res = resliste.get(i);
}
return res;
// return joueurs.get((int)Math.floor(Math.random() * joueurs.size()));
} }
public int getDifficulte() { public int getDifficulte() {

View File

@ -0,0 +1,43 @@
package database;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import org.junit.Assert;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
public class TestDatabse {
Table t;
@BeforeEach
private void initialize() {
System.out.println("=====Initialisation du test=====");
t = new Table("Table de Test");
}
@AfterEach
private void free() {
System.out.println("=====Fin du test=====\n\n\n");
}
@Test
private void testDBConnexion() {
try (Connection connection = DriverManager.getConnection("jdbc:postgresql://localhost:5432/ShadowHunterDatabase", "shManager", "shadowhunter1234")) { //notre utilisateur que l'on utilisera (:
System.out.println("Connected to PostgreSQL database!");
} catch (SQLException e) {
System.out.println("Connection failure.");
e.printStackTrace();
}
}
@Test
private void getEntireTableCartesLumiere() {
t.remplirTableAllFrom("CartesLumiere");
Assert.assertFalse(t.isEmpty());
}
}