Merging
This commit is contained in:
commit
4734e9bb7d
@ -19,7 +19,13 @@ Pour gagner, les Hunters et Shadow doivent éliminer tous les personnages du cam
|
|||||||
|
|
||||||
## Comment l'utiliser
|
## Comment l'utiliser
|
||||||
|
|
||||||
Vous trouverez la documentation pour utliser notre application [ici].
|
Dans un premier temps, vous pouvez télécharger la dernière version de notre application en utilisant la commande :
|
||||||
|
|
||||||
|
```git clone https://github.com/PTE-SH/ShadowHunterGame.git```
|
||||||
|
|
||||||
|
Puis, il faut executez le ``ShadowHunterGame.exe`` pour pouvoir y jouer.
|
||||||
|
|
||||||
|
Ce projet repose sur le [Java JDK 11](https://www.oracle.com/java/technologies/javase-jdk11-downloads.html) pour pouvoir fonctionner.
|
||||||
|
|
||||||
## Auteurs
|
## Auteurs
|
||||||
|
|
||||||
|
39
src/database/DatabaseManager.java
Normal file
39
src/database/DatabaseManager.java
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
package database;
|
||||||
|
|
||||||
|
import java.sql.Connection;
|
||||||
|
import java.sql.DriverManager;
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
import java.sql.Statement;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class DatabaseManager {
|
||||||
|
|
||||||
|
private final static String url = "jdbc:postgresql://localhost:5432/ShadowHunterDatabase";
|
||||||
|
private final static String user = "shManager";
|
||||||
|
private final static String password = "shadowhunter1234";
|
||||||
|
|
||||||
|
public static Connection connect() throws SQLException {
|
||||||
|
return DriverManager.getConnection(url, user, password);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static List<Record> remplirTable(String query) {
|
||||||
|
List<Record> list = new ArrayList<Record>();
|
||||||
|
try (Connection connection = connect()) {
|
||||||
|
|
||||||
|
//System.out.println("Connected to PostgreSQL database!");
|
||||||
|
Statement statement = connection.createStatement();
|
||||||
|
//System.out.println("Reading records...");
|
||||||
|
ResultSet retour = statement.executeQuery(query);
|
||||||
|
while (retour.next()) {
|
||||||
|
list.add(new Record(retour.getString("id"), retour.getString("nom"), retour.getBytes("image"), retour.getBytes("objet")));
|
||||||
|
}
|
||||||
|
} catch (SQLException e) {
|
||||||
|
System.err.println("Connection failure.");
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -1,44 +1,14 @@
|
|||||||
package database;
|
package database;
|
||||||
|
|
||||||
import java.awt.image.BufferedImage;
|
|
||||||
import java.io.ByteArrayInputStream;
|
|
||||||
import java.io.File;
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
import javax.imageio.ImageIO;
|
|
||||||
|
|
||||||
/*
|
|
||||||
import java.sql.Connection;
|
|
||||||
import java.sql.DriverManager;
|
|
||||||
import java.sql.ResultSet;
|
|
||||||
import java.sql.SQLException;
|
|
||||||
import java.sql.Statement;
|
|
||||||
*/
|
|
||||||
|
|
||||||
public class DatabaseTesting {
|
public class DatabaseTesting {
|
||||||
public static void main(String[] args) throws IOException {
|
public static void main(String[] args) throws IOException {
|
||||||
Table a = new Table("a");
|
Table a = new Table("a");
|
||||||
a.remplirTableAllFrom("CartesAll");
|
|
||||||
|
a.fillList(QueryGenerator.AllFrom("CartesAll"));
|
||||||
System.out.println(a.toString());
|
System.out.println(a.toString());
|
||||||
|
|
||||||
//a.getList().get(1).getImg()
|
|
||||||
|
|
||||||
|
|
||||||
BufferedImage image = ImageIO.read( new ByteArrayInputStream( a.getList().get(1).getImg() ) );
|
|
||||||
ImageIO.write(image, "JPG", new File("filename.jpg"));
|
|
||||||
|
|
||||||
/*
|
|
||||||
* PreparedStatement ps = conn.prepareStatement("SELECT img FROM images WHERE imgname = ?");
|
|
||||||
ps.setString(1, "myimage.gif");
|
|
||||||
ResultSet rs = ps.executeQuery();
|
|
||||||
while (rs.next()) {
|
|
||||||
byte[] imgBytes = rs.getBytes(1); OR byte []out = (byte[])(rs.getObject(1));
|
|
||||||
// use the data in some way here
|
|
||||||
}
|
|
||||||
rs.close();
|
|
||||||
ps.close();*/
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -9,6 +9,7 @@ public class Record {
|
|||||||
|
|
||||||
public Record() {
|
public Record() {
|
||||||
this("0", "", null);
|
this("0", "", null);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Record(String n, byte[] b) {
|
public Record(String n, byte[] b) {
|
||||||
@ -22,6 +23,7 @@ public class Record {
|
|||||||
this.img = b;
|
this.img = b;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public Record(String i, String n, byte[] b, byte[] obj) {
|
public Record(String i, String n, byte[] b, byte[] obj) {
|
||||||
this.id = i;
|
this.id = i;
|
||||||
this.nom = n;
|
this.nom = n;
|
||||||
@ -40,9 +42,10 @@ public class Record {
|
|||||||
public byte[] getImg() {
|
public byte[] getImg() {
|
||||||
return img;
|
return img;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
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 %-20.30s%n", this.getId(), this.getNom(), this.getImg(), this.getObjet());
|
||||||
}
|
}
|
||||||
|
|
||||||
public byte[] getObjet() {
|
public byte[] getObjet() {
|
||||||
|
@ -21,55 +21,8 @@ public class Table {
|
|||||||
this.name = JavaTableName;
|
this.name = JavaTableName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void remplirTableAllFrom(String DatabaseTableName) {
|
public void fillList(String query) {
|
||||||
try (Connection connection = DriverManager.getConnection("jdbc:postgresql://localhost:5432/ShadowHunterDatabase", "shManager", "shadowhunter1234")) { //notre utilisateur que l'on utilisera (:
|
this.list = DatabaseManager.remplirTable(query);
|
||||||
|
|
||||||
System.out.println("Connected to PostgreSQL database!");
|
|
||||||
Statement statement = connection.createStatement();
|
|
||||||
System.out.println("Reading records...");
|
|
||||||
ResultSet retour = statement.executeQuery(QueryGenerator.AllFrom(DatabaseTableName));
|
|
||||||
while (retour.next()) {
|
|
||||||
list.add(new Record(retour.getString("id"), retour.getString("nom"), retour.getBytes("image")));
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch (SQLException e) {
|
|
||||||
System.out.println("Connection failure.");
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void remplirTableWithId(String DatabaseTableName, int id) {
|
|
||||||
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!");
|
|
||||||
Statement statement = connection.createStatement();
|
|
||||||
System.out.println("Reading records...");
|
|
||||||
ResultSet retour = statement.executeQuery(QueryGenerator.WithId(DatabaseTableName, id));
|
|
||||||
while (retour.next()) {
|
|
||||||
list.add(new Record(retour.getString("id"), retour.getString("nom"), retour.getBytes("image")));
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch (SQLException e) {
|
|
||||||
System.out.println("Connection failure.");
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void remplirTableWithName(String DatabaseTableName, String s) {
|
|
||||||
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!");
|
|
||||||
Statement statement = connection.createStatement();
|
|
||||||
System.out.println("Reading records...");
|
|
||||||
ResultSet retour = statement.executeQuery(QueryGenerator.WithName(DatabaseTableName, s));
|
|
||||||
while (retour.next()) {
|
|
||||||
list.add(new Record(retour.getString("id"), retour.getString("nom"), retour.getBytes("image")));
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch (SQLException e) {
|
|
||||||
System.out.println("Connection failure.");
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void remplirTableQuery(String query) {
|
public void remplirTableQuery(String query) {
|
||||||
@ -89,23 +42,23 @@ public class Table {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getName() {
|
protected String getName() {
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setName(String name) {
|
protected void setName(String name) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Record> getList() {
|
protected List<Record> getList() {
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return " " + this.getList();
|
return this.getList().toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isEmpty() {
|
protected boolean isEmpty() {
|
||||||
if(list.isEmpty()) {
|
if(list.isEmpty()) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
|
@ -16,8 +16,7 @@ import main.GestionnaireJeu;
|
|||||||
public class Main extends Application {
|
public class Main extends Application {
|
||||||
@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", Locale.FRANCE);
|
||||||
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
|
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
|
||||||
Pane root = fxmlLoader.load();
|
Pane root = fxmlLoader.load();
|
||||||
@ -30,7 +29,7 @@ public class Main extends Application {
|
|||||||
public void handle(WindowEvent arg0) {
|
public void handle(WindowEvent arg0) {
|
||||||
System.exit(0);
|
System.exit(0);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
primaryStage.setMaximized(true);
|
primaryStage.setMaximized(true);
|
||||||
primaryStage.show();
|
primaryStage.show();
|
||||||
}
|
}
|
||||||
|
@ -1,24 +1,62 @@
|
|||||||
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.List;
|
||||||
import java.util.ResourceBundle;
|
import java.util.ResourceBundle;
|
||||||
|
|
||||||
import carte.CarteEquipement;
|
|
||||||
import javafx.fxml.FXML;
|
import javafx.fxml.FXML;
|
||||||
import javafx.fxml.Initializable;
|
import javafx.fxml.Initializable;
|
||||||
|
import javafx.scene.image.Image;
|
||||||
|
import javafx.scene.image.ImageView;
|
||||||
import javafx.scene.layout.GridPane;
|
import javafx.scene.layout.GridPane;
|
||||||
import main.Joueur;
|
import carte.CarteEquipement;
|
||||||
|
|
||||||
public class ChoisirEquipement implements Initializable{
|
public class ChoisirEquipement implements Initializable{
|
||||||
@FXML private GridPane equipement;
|
@FXML private GridPane grilleEquipement;
|
||||||
|
|
||||||
private Joueur joueurVole;
|
private List<CarteEquipement> equipements = new ArrayList<CarteEquipement>();
|
||||||
private CarteEquipement equipementVole;
|
private CarteEquipement equipementSelected;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initialize(URL arg0, ResourceBundle arg1) {
|
public void initialize(URL arg0, ResourceBundle arg1) {
|
||||||
// TODO Auto-generated method stub
|
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() {
|
||||||
|
return equipements;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEquipements(List<CarteEquipement> equipements) {
|
||||||
|
this.equipements = equipements;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CarteEquipement getEquipementSelected() {
|
||||||
|
return equipementSelected;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEquipementSelected(CarteEquipement equipementSelected) {
|
||||||
|
this.equipementSelected = equipementSelected;
|
||||||
|
}
|
||||||
|
|
||||||
|
public GridPane getGrilleEquipement() {
|
||||||
|
return grilleEquipement;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGrilleEquipement(GridPane grilleEquipement) {
|
||||||
|
this.grilleEquipement = grilleEquipement;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -20,13 +20,15 @@ public class ChoisirJoueur implements Initializable{
|
|||||||
for (int i=0; i<joueurHaut.getChildren().size(); i++) {
|
for (int i=0; i<joueurHaut.getChildren().size(); i++) {
|
||||||
int numJoueur = i;
|
int numJoueur = i;
|
||||||
joueurHaut.getChildren().get(i).setOnMouseClicked(e -> {
|
joueurHaut.getChildren().get(i).setOnMouseClicked(e -> {
|
||||||
|
System.out.println("Vous avez choisi le joueur " + (numJoueur+1));
|
||||||
this.joueurSelected = numJoueur;
|
this.joueurSelected = numJoueur;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i=0; i<joueurBas.getChildren().size(); i++) {
|
for (int i=0; i<joueurBas.getChildren().size(); i++) {
|
||||||
int numJoueur = i;
|
int numJoueur = i+4;
|
||||||
joueurHaut.getChildren().get(i).setOnMouseClicked(e -> {
|
joueurBas.getChildren().get(i).setOnMouseClicked(e -> {
|
||||||
|
System.out.println("Vous avez choisi le joueur " + (numJoueur+1));
|
||||||
this.joueurSelected = numJoueur;
|
this.joueurSelected = numJoueur;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -1,9 +0,0 @@
|
|||||||
package ihm.controller;
|
|
||||||
|
|
||||||
public class JouerSonTour2Controller extends ChoisirBoolean{
|
|
||||||
public void initButtons () {
|
|
||||||
super.getOuiButton().setText("utiliser.capaciter.lieux");
|
|
||||||
super.getNonButton().setText("sauter.etape");
|
|
||||||
super.getTitre().setText("description.capacite.carte.lieux");
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,9 +0,0 @@
|
|||||||
package ihm.controller;
|
|
||||||
|
|
||||||
public class JouerSonTour2c1Controller extends ChoisirBoolean{
|
|
||||||
public void initButtons () {
|
|
||||||
super.getOuiButton().setText("Attaquer !");
|
|
||||||
super.getNonButton().setText("se.soigner");
|
|
||||||
super.getTitre().setText("attaquer.ou.soigner");
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,9 +0,0 @@
|
|||||||
package ihm.controller;
|
|
||||||
|
|
||||||
public class JouerSonTour3Controller extends ChoisirBoolean{
|
|
||||||
public void initButtons () {
|
|
||||||
super.getOuiButton().setText("Attaquer !");
|
|
||||||
super.getNonButton().setText("Ne pas attaquer");
|
|
||||||
super.getTitre().setText("Voulez-vous attaquer un joueur ?");
|
|
||||||
}
|
|
||||||
}
|
|
@ -15,6 +15,6 @@ public class JouerSonTour4Controller extends LancerDes{
|
|||||||
@Override
|
@Override
|
||||||
public void initialize(URL arg0, ResourceBundle arg1) {
|
public void initialize(URL arg0, ResourceBundle arg1) {
|
||||||
super.initialize(arg0, arg1);
|
super.initialize(arg0, arg1);
|
||||||
defenseur.setText(j.getNom());
|
//defenseur.setText(j.getNom());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,8 +14,13 @@ public class LancerDes implements Initializable{
|
|||||||
@FXML private Button btnStop;
|
@FXML private Button btnStop;
|
||||||
@FXML private Button btnLancer;
|
@FXML private Button btnLancer;
|
||||||
|
|
||||||
|
private int[] valeurD6 = {1, 2, 3, 4, 5, 6};
|
||||||
|
private int[] valeurD4 = {1, 2, 3, 4};
|
||||||
|
|
||||||
private int resultatD6;
|
private int resultatD6;
|
||||||
private int resultatD4;
|
private int resultatD4;
|
||||||
|
|
||||||
|
private boolean lancement = true;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initialize(URL arg0, ResourceBundle arg1) {
|
public void initialize(URL arg0, ResourceBundle arg1) {
|
||||||
@ -23,27 +28,30 @@ public class LancerDes implements Initializable{
|
|||||||
btnStop.setVisible(false);
|
btnStop.setVisible(false);
|
||||||
|
|
||||||
btnLancer.setOnAction(e -> {
|
btnLancer.setOnAction(e -> {
|
||||||
lancement();
|
try {
|
||||||
btnLancer.setVisible(false);
|
btnLancer.setVisible(false);
|
||||||
btnStop.setVisible(true);
|
btnStop.setVisible(true);
|
||||||
|
lancement();
|
||||||
|
} catch (InterruptedException e1) {
|
||||||
|
e1.printStackTrace();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
btnStop.setOnAction(e -> {
|
btnStop.setOnAction(e -> {
|
||||||
//à remplir avec les valeurs donné par le gestionnaire de jeux
|
//à remplir avec les valeurs donné par le gestionnaire de jeux
|
||||||
|
lancement = false;
|
||||||
d6.setText(Integer.toString(resultatD6));
|
d6.setText(Integer.toString(resultatD6));
|
||||||
d4.setText(Integer.toString(resultatD4));
|
d4.setText(Integer.toString(resultatD4));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void lancement() {
|
public void lancement() throws InterruptedException {
|
||||||
/*for (int i=1; i<7; i++) {
|
/*int i=0;
|
||||||
Thread.sleep(500);
|
while (lancement) {
|
||||||
d6.setText(Integer.toString(i));
|
d6.setText(Integer.toString(valeurD6[i%6]));
|
||||||
}
|
d4.setText(Integer.toString(valeurD4[i%4]));
|
||||||
|
i++;
|
||||||
for (int i=1; i<5; i++) {
|
//Thread.sleep(500);
|
||||||
Thread.sleep(500);
|
|
||||||
d4.setText(Integer.toString(i));
|
|
||||||
}*/
|
}*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
40
src/ihm/controller/PiocherCarte.java
Normal file
40
src/ihm/controller/PiocherCarte.java
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
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 main.Type;
|
||||||
|
import main.TypeLumiere;
|
||||||
|
import main.TypeTenebre;
|
||||||
|
import main.TypeVision;
|
||||||
|
|
||||||
|
public class PiocherCarte implements Initializable{
|
||||||
|
@FXML private Button lumiere;
|
||||||
|
@FXML private Button vision;
|
||||||
|
@FXML private Button tenebre;
|
||||||
|
|
||||||
|
private Type carte;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void initialize(URL arg0, ResourceBundle arg1) {
|
||||||
|
lumiere.setOnAction(e ->{
|
||||||
|
carte = new TypeLumiere();
|
||||||
|
});
|
||||||
|
|
||||||
|
vision.setOnAction(e -> {
|
||||||
|
carte = new TypeVision();
|
||||||
|
});
|
||||||
|
|
||||||
|
tenebre.setOnAction(e -> {
|
||||||
|
carte = new TypeTenebre();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public Type getCarte() {
|
||||||
|
return carte;
|
||||||
|
}
|
||||||
|
}
|
69
src/ihm/controller/VisualiserCarte.java
Normal file
69
src/ihm/controller/VisualiserCarte.java
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
package ihm.controller;
|
||||||
|
|
||||||
|
import java.net.URL;
|
||||||
|
import java.util.ResourceBundle;
|
||||||
|
|
||||||
|
import carte.Carte;
|
||||||
|
import javafx.fxml.FXML;
|
||||||
|
import javafx.fxml.Initializable;
|
||||||
|
import javafx.scene.control.Label;
|
||||||
|
import javafx.scene.image.ImageView;
|
||||||
|
import javafx.scene.input.MouseEvent;
|
||||||
|
|
||||||
|
public class VisualiserCarte implements Initializable{
|
||||||
|
@FXML private Label typeCarte;
|
||||||
|
@FXML private Label effetCarte;
|
||||||
|
@FXML private ImageView imageCarte;
|
||||||
|
|
||||||
|
private Carte carte;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void initialize(URL arg0, ResourceBundle arg1) {
|
||||||
|
/*typeCarte.setText(carte.getNom());
|
||||||
|
effetCarte.setText(carte.getDescription());*/
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* signe la fin du tour
|
||||||
|
* @param mouseEvent click n'importe ou sur la fenetre
|
||||||
|
*/
|
||||||
|
@FXML
|
||||||
|
private void fin (MouseEvent mouseEvent) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public Label getTypeCarte() {
|
||||||
|
return typeCarte;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTypeCarte(Label typeCarte) {
|
||||||
|
this.typeCarte = typeCarte;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Label getEffetCarte() {
|
||||||
|
return effetCarte;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEffetCarte(Label effetCarte) {
|
||||||
|
this.effetCarte = effetCarte;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ImageView getImageCarte() {
|
||||||
|
return imageCarte;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setImageCarte(ImageView imageCarte) {
|
||||||
|
this.imageCarte = imageCarte;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Carte getCarte() {
|
||||||
|
return carte;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCarte(Carte carte) {
|
||||||
|
this.carte = carte;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
12
src/ihm/controller/VisualiserCarteVision.java
Normal file
12
src/ihm/controller/VisualiserCarteVision.java
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
package ihm.controller;
|
||||||
|
|
||||||
|
import javafx.fxml.FXML;
|
||||||
|
import javafx.scene.input.MouseEvent;
|
||||||
|
|
||||||
|
public class VisualiserCarteVision extends VisualiserCarte{
|
||||||
|
@FXML
|
||||||
|
public void voirCarte(MouseEvent mouseEvent) {
|
||||||
|
//super.getImageCarte().setImage(arg0);
|
||||||
|
System.out.println("\tCarte vision");
|
||||||
|
}
|
||||||
|
}
|
@ -1,11 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
|
|
||||||
<?import javafx.scene.image.Image?>
|
|
||||||
<?import javafx.scene.image.ImageView?>
|
|
||||||
|
|
||||||
|
|
||||||
<ImageView fitHeight="189.0" fitWidth="379.0" preserveRatio="true" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1">
|
|
||||||
<image>
|
|
||||||
<Image url="@img/dice.sprite.png" />
|
|
||||||
</image>
|
|
||||||
</ImageView>
|
|
@ -8,7 +8,7 @@
|
|||||||
<?import javafx.scene.layout.Pane?>
|
<?import javafx.scene.layout.Pane?>
|
||||||
<?import javafx.scene.text.Font?>
|
<?import javafx.scene.text.Font?>
|
||||||
|
|
||||||
<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">
|
<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.ChoisirBoolean">
|
||||||
<children>
|
<children>
|
||||||
<Pane fx:id="rootPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="180.0" prefWidth="255.0" stylesheets="@style/popUp.css">
|
<Pane fx:id="rootPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="180.0" prefWidth="255.0" stylesheets="@style/popUp.css">
|
||||||
<children>
|
<children>
|
||||||
|
@ -14,9 +14,9 @@
|
|||||||
<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 layoutX="58.0" layoutY="14.0" text="%voler.equipement.joueur" />
|
<Label layoutX="58.0" layoutY="14.0" text="%voler.equipement.joueur" />
|
||||||
<ScrollPane layoutX="28.0" layoutY="40.0" prefHeight="128.0" prefWidth="200.0">
|
<ScrollPane layoutX="28.0" layoutY="38.0" prefHeight="128.0" prefWidth="200.0">
|
||||||
<content>
|
<content>
|
||||||
<GridPane fx:id="equipement">
|
<GridPane fx:id="grilleEquipement">
|
||||||
<columnConstraints>
|
<columnConstraints>
|
||||||
<ColumnConstraints hgrow="SOMETIMES" />
|
<ColumnConstraints hgrow="SOMETIMES" />
|
||||||
<ColumnConstraints hgrow="SOMETIMES" />
|
<ColumnConstraints hgrow="SOMETIMES" />
|
||||||
@ -25,6 +25,8 @@
|
|||||||
</columnConstraints>
|
</columnConstraints>
|
||||||
<rowConstraints>
|
<rowConstraints>
|
||||||
<RowConstraints vgrow="SOMETIMES" />
|
<RowConstraints vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints vgrow="SOMETIMES" />
|
||||||
<RowConstraints vgrow="SOMETIMES" />
|
<RowConstraints vgrow="SOMETIMES" />
|
||||||
<RowConstraints vgrow="SOMETIMES" />
|
<RowConstraints vgrow="SOMETIMES" />
|
||||||
<RowConstraints vgrow="SOMETIMES" />
|
<RowConstraints vgrow="SOMETIMES" />
|
||||||
@ -34,6 +36,14 @@
|
|||||||
<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="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="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.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>
|
</children>
|
||||||
</GridPane>
|
</GridPane>
|
||||||
</content>
|
</content>
|
||||||
|
@ -1,15 +1,44 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<?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.layout.AnchorPane?>
|
<?import javafx.scene.layout.AnchorPane?>
|
||||||
<?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" fx:controller="ihm.controller.PiocherCarte">
|
||||||
<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 fx:id="rootPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="180.0" prefWidth="255.0" stylesheets="@style/popUp.css">
|
<Pane fx:id="rootPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="180.0" prefWidth="255.0" stylesheets="@style/popUp.css">
|
||||||
<children>
|
<children>
|
||||||
<Label layoutX="88.0" layoutY="82.0" text="%piocher.carte" />
|
<Label layoutX="88.0" layoutY="40.0" text="%piocher.carte" />
|
||||||
|
<Button fx:id="lumiere" layoutX="20.0" layoutY="77.0" mnemonicParsing="false" style="-fx-border-width: 0;">
|
||||||
|
<graphic>
|
||||||
|
<ImageView fitHeight="77.0" fitWidth="55.0" pickOnBounds="true" preserveRatio="true">
|
||||||
|
<image>
|
||||||
|
<Image url="@img/dosCartesLumière.jpg" />
|
||||||
|
</image>
|
||||||
|
</ImageView>
|
||||||
|
</graphic>
|
||||||
|
</Button>
|
||||||
|
<Button fx:id="vision" layoutX="93.0" layoutY="77.0" mnemonicParsing="false" style="-fx-border-width: 0;">
|
||||||
|
<graphic>
|
||||||
|
<ImageView fitHeight="77.0" fitWidth="55.0" pickOnBounds="true" preserveRatio="true">
|
||||||
|
<image>
|
||||||
|
<Image url="@img/dosCartesVision.jpg" />
|
||||||
|
</image>
|
||||||
|
</ImageView>
|
||||||
|
</graphic>
|
||||||
|
</Button>
|
||||||
|
<Button fx:id="tenebre" layoutX="166.0" layoutY="77.0" mnemonicParsing="false" style="-fx-border-width: 0;">
|
||||||
|
<graphic>
|
||||||
|
<ImageView fitHeight="77.0" fitWidth="55.0" pickOnBounds="true" preserveRatio="true">
|
||||||
|
<image>
|
||||||
|
<Image url="@img/dosCartesNoires.jpg" />
|
||||||
|
</image>
|
||||||
|
</ImageView>
|
||||||
|
</graphic>
|
||||||
|
</Button>
|
||||||
</children>
|
</children>
|
||||||
</Pane>
|
</Pane>
|
||||||
</children>
|
</children>
|
||||||
|
@ -7,24 +7,23 @@
|
|||||||
<?import javafx.scene.layout.Pane?>
|
<?import javafx.scene.layout.Pane?>
|
||||||
<?import javafx.scene.layout.VBox?>
|
<?import javafx.scene.layout.VBox?>
|
||||||
|
|
||||||
|
<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.VisualiserCarte">
|
||||||
<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 fx:id="rootPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="180.0" prefWidth="255.0" stylesheets="@style/popUp.css">
|
<Pane fx:id="rootPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" onMouseClicked="#fin" prefHeight="180.0" prefWidth="255.0" stylesheets="@style/popUp.css">
|
||||||
<children>
|
<children>
|
||||||
<VBox alignment="CENTER" prefHeight="180.0" prefWidth="255.0">
|
<VBox alignment="CENTER" prefHeight="180.0" prefWidth="255.0">
|
||||||
<children>
|
<children>
|
||||||
<HBox alignment="CENTER" prefHeight="72.0" prefWidth="357.0">
|
<HBox alignment="CENTER" prefHeight="72.0" prefWidth="357.0">
|
||||||
<children>
|
<children>
|
||||||
<Label prefHeight="27.0" prefWidth="54.0" text="%carte" />
|
<Label prefHeight="27.0" prefWidth="54.0" text="%carte" />
|
||||||
<Label prefHeight="17.0" prefWidth="121.0" text="*Lumiere ou Tenebre" />
|
<Label fx:id="typeCarte" prefHeight="17.0" prefWidth="121.0" text="*Lumiere ou Tenebre" />
|
||||||
</children>
|
</children>
|
||||||
</HBox>
|
</HBox>
|
||||||
<ImageView fitHeight="131.0" fitWidth="94.0" pickOnBounds="true" preserveRatio="true" />
|
<ImageView fx:id="imageCarte" fitHeight="131.0" fitWidth="94.0" pickOnBounds="true" preserveRatio="true" />
|
||||||
<HBox alignment="CENTER" prefHeight="111.0" prefWidth="600.0">
|
<HBox alignment="CENTER" prefHeight="111.0" prefWidth="600.0">
|
||||||
<children>
|
<children>
|
||||||
<Label prefHeight="27.0" prefWidth="54.0" text="%effet" />
|
<Label prefHeight="27.0" prefWidth="54.0" text="%effet" />
|
||||||
<Label prefHeight="27.0" prefWidth="91.0" text="*effet de la carte" />
|
<Label fx:id="effetCarte" prefHeight="27.0" prefWidth="91.0" text="*effet de la carte" />
|
||||||
</children>
|
</children>
|
||||||
</HBox>
|
</HBox>
|
||||||
</children>
|
</children>
|
||||||
|
@ -8,15 +8,14 @@
|
|||||||
<?import javafx.scene.layout.Pane?>
|
<?import javafx.scene.layout.Pane?>
|
||||||
<?import javafx.scene.layout.VBox?>
|
<?import javafx.scene.layout.VBox?>
|
||||||
|
|
||||||
|
<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.VisualiserCarteVision">
|
||||||
<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 fx:id="rootPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="180.0" prefWidth="255.0" stylesheets="@style/popUp.css">
|
<Pane fx:id="rootPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="180.0" prefWidth="255.0" stylesheets="@style/popUp.css">
|
||||||
<children>
|
<children>
|
||||||
<VBox alignment="CENTER" prefHeight="180.0" prefWidth="255.0">
|
<VBox alignment="CENTER" prefHeight="180.0" prefWidth="255.0">
|
||||||
<children>
|
<children>
|
||||||
<Label prefHeight="17.0" prefWidth="76.0" text="%carte.vision" />
|
<Label fx:id="typeCarte" prefHeight="17.0" prefWidth="76.0" text="%carte.vision" />
|
||||||
<ImageView fitHeight="104.0" fitWidth="75.0" pickOnBounds="true" preserveRatio="true" />
|
<ImageView fx:id="imageCarte" fitHeight="104.0" fitWidth="75.0" pickOnBounds="true" preserveRatio="true" />
|
||||||
<Label prefHeight="17.0" prefWidth="155.0" text="%carte.vue.par.joueur.pioche" />
|
<Label prefHeight="17.0" prefWidth="155.0" text="%carte.vue.par.joueur.pioche" />
|
||||||
<Button mnemonicParsing="false" onMouseClicked="#voirCarte" text="%voir.carte">
|
<Button mnemonicParsing="false" onMouseClicked="#voirCarte" text="%voir.carte">
|
||||||
<VBox.margin>
|
<VBox.margin>
|
||||||
|
@ -1,41 +1,84 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<?import javafx.geometry.Insets?>
|
||||||
|
<?import javafx.scene.control.Button?>
|
||||||
<?import javafx.scene.control.Label?>
|
<?import javafx.scene.control.Label?>
|
||||||
<?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.Pane?>
|
||||||
<?import javafx.scene.layout.VBox?>
|
<?import javafx.scene.text.Font?>
|
||||||
|
|
||||||
|
<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.ChoisirJoueur">
|
||||||
<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 fx:id="rootPane" 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>
|
||||||
<VBox alignment="CENTER" prefHeight="165.0" prefWidth="255.0">
|
<HBox fx:id="joueurHaut" layoutX="4.0" layoutY="14.0">
|
||||||
<children>
|
<children>
|
||||||
<HBox alignment="CENTER" prefHeight="184.0" prefWidth="600.0">
|
<Button mnemonicParsing="false" text="%joueur1">
|
||||||
<children>
|
<font>
|
||||||
<VBox alignment="CENTER" prefHeight="178.0" prefWidth="599.0">
|
<Font size="10.0" />
|
||||||
<children>
|
</font>
|
||||||
<Label prefHeight="17.0" prefWidth="69.0" text="%voir.carte" />
|
</Button>
|
||||||
<HBox alignment="CENTER" prefHeight="100.0" prefWidth="200.0">
|
<Button mnemonicParsing="false" text="%joueur2">
|
||||||
<children>
|
<font>
|
||||||
<ImageView fitHeight="114.0" fitWidth="82.0" pickOnBounds="true" preserveRatio="true" />
|
<Font size="10.0" />
|
||||||
<HBox alignment="CENTER" prefHeight="100.0" prefWidth="200.0">
|
</font>
|
||||||
<children>
|
<HBox.margin>
|
||||||
<Label prefHeight="27.0" prefWidth="97.0" text="*Effet de la carte" textAlignment="CENTER" />
|
<Insets left="2.0" />
|
||||||
</children>
|
</HBox.margin>
|
||||||
</HBox>
|
</Button>
|
||||||
</children>
|
<Button mnemonicParsing="false" text="%joueur3">
|
||||||
</HBox>
|
<font>
|
||||||
<Label prefHeight="17.0" prefWidth="136.0" text="%jouer.a.qui.donner.carte" />
|
<Font size="10.0" />
|
||||||
</children>
|
</font>
|
||||||
</VBox>
|
<HBox.margin>
|
||||||
</children>
|
<Insets left="2.0" />
|
||||||
</HBox>
|
</HBox.margin>
|
||||||
|
</Button>
|
||||||
|
<Button mnemonicParsing="false" text="%joueur4">
|
||||||
|
<font>
|
||||||
|
<Font size="10.0" />
|
||||||
|
</font>
|
||||||
|
<HBox.margin>
|
||||||
|
<Insets left="2.0" />
|
||||||
|
</HBox.margin>
|
||||||
|
</Button>
|
||||||
</children>
|
</children>
|
||||||
</VBox>
|
</HBox>
|
||||||
|
<HBox fx:id="joueurBas" layoutX="4.0" layoutY="139.0">
|
||||||
|
<children>
|
||||||
|
<Button mnemonicParsing="false" text="%joueur5">
|
||||||
|
<font>
|
||||||
|
<Font size="10.0" />
|
||||||
|
</font>
|
||||||
|
<HBox.margin>
|
||||||
|
<Insets right="2.0" />
|
||||||
|
</HBox.margin>
|
||||||
|
</Button>
|
||||||
|
<Button mnemonicParsing="false" text="%joueur6">
|
||||||
|
<font>
|
||||||
|
<Font size="10.0" />
|
||||||
|
</font>
|
||||||
|
<HBox.margin>
|
||||||
|
<Insets right="2.0" />
|
||||||
|
</HBox.margin>
|
||||||
|
</Button>
|
||||||
|
<Button mnemonicParsing="false" text="%joueur7">
|
||||||
|
<font>
|
||||||
|
<Font size="10.0" />
|
||||||
|
</font>
|
||||||
|
<HBox.margin>
|
||||||
|
<Insets right="2.0" />
|
||||||
|
</HBox.margin>
|
||||||
|
</Button>
|
||||||
|
<Button mnemonicParsing="false" text="%joueur8">
|
||||||
|
<font>
|
||||||
|
<Font size="10.0" />
|
||||||
|
</font>
|
||||||
|
</Button>
|
||||||
|
</children>
|
||||||
|
</HBox>
|
||||||
|
<Label fx:id="titre" layoutX="9.0" layoutY="82.0" text="Choisir un joueur à qui donner la carte vision" />
|
||||||
</children>
|
</children>
|
||||||
</Pane>
|
</Pane>
|
||||||
</children>
|
</children>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<?import javafx.scene.layout.AnchorPane?>
|
<?import javafx.scene.layout.AnchorPane?>
|
||||||
<?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" fx:controller="ihm.controller.JouerSonTour2c1Controller">
|
<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.ChoisirBoolean">
|
||||||
<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>
|
||||||
|
@ -0,0 +1,85 @@
|
|||||||
|
<?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.Pane?>
|
||||||
|
<?import javafx.scene.text.Font?>
|
||||||
|
|
||||||
|
<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.ChoisirJoueur">
|
||||||
|
<children>
|
||||||
|
<Pane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="180.0" prefWidth="255.0" stylesheets="@style/popUp.css">
|
||||||
|
<children>
|
||||||
|
<HBox fx:id="joueurHaut" layoutX="4.0" layoutY="14.0">
|
||||||
|
<children>
|
||||||
|
<Button mnemonicParsing="false" text="%joueur1">
|
||||||
|
<font>
|
||||||
|
<Font size="10.0" />
|
||||||
|
</font>
|
||||||
|
</Button>
|
||||||
|
<Button mnemonicParsing="false" text="%joueur2">
|
||||||
|
<font>
|
||||||
|
<Font size="10.0" />
|
||||||
|
</font>
|
||||||
|
<HBox.margin>
|
||||||
|
<Insets left="2.0" />
|
||||||
|
</HBox.margin>
|
||||||
|
</Button>
|
||||||
|
<Button mnemonicParsing="false" text="%joueur3">
|
||||||
|
<font>
|
||||||
|
<Font size="10.0" />
|
||||||
|
</font>
|
||||||
|
<HBox.margin>
|
||||||
|
<Insets left="2.0" />
|
||||||
|
</HBox.margin>
|
||||||
|
</Button>
|
||||||
|
<Button mnemonicParsing="false" text="%joueur4">
|
||||||
|
<font>
|
||||||
|
<Font size="10.0" />
|
||||||
|
</font>
|
||||||
|
<HBox.margin>
|
||||||
|
<Insets left="2.0" />
|
||||||
|
</HBox.margin>
|
||||||
|
</Button>
|
||||||
|
</children>
|
||||||
|
</HBox>
|
||||||
|
<HBox fx:id="joueurBas" layoutX="4.0" layoutY="139.0">
|
||||||
|
<children>
|
||||||
|
<Button mnemonicParsing="false" text="%joueur5">
|
||||||
|
<font>
|
||||||
|
<Font size="10.0" />
|
||||||
|
</font>
|
||||||
|
<HBox.margin>
|
||||||
|
<Insets right="2.0" />
|
||||||
|
</HBox.margin>
|
||||||
|
</Button>
|
||||||
|
<Button mnemonicParsing="false" text="%joueur6">
|
||||||
|
<font>
|
||||||
|
<Font size="10.0" />
|
||||||
|
</font>
|
||||||
|
<HBox.margin>
|
||||||
|
<Insets right="2.0" />
|
||||||
|
</HBox.margin>
|
||||||
|
</Button>
|
||||||
|
<Button mnemonicParsing="false" text="%joueur7">
|
||||||
|
<font>
|
||||||
|
<Font size="10.0" />
|
||||||
|
</font>
|
||||||
|
<HBox.margin>
|
||||||
|
<Insets right="2.0" />
|
||||||
|
</HBox.margin>
|
||||||
|
</Button>
|
||||||
|
<Button mnemonicParsing="false" text="%joueur8">
|
||||||
|
<font>
|
||||||
|
<Font size="10.0" />
|
||||||
|
</font>
|
||||||
|
</Button>
|
||||||
|
</children>
|
||||||
|
</HBox>
|
||||||
|
<Label fx:id="titre" layoutX="50.0" layoutY="82.0" text="Choisir un joueur à attaquer !" />
|
||||||
|
</children>
|
||||||
|
</Pane>
|
||||||
|
</children>
|
||||||
|
</AnchorPane>
|
@ -4,7 +4,7 @@
|
|||||||
<?import javafx.scene.control.Label?>
|
<?import javafx.scene.control.Label?>
|
||||||
<?import javafx.scene.layout.Pane?>
|
<?import javafx.scene.layout.Pane?>
|
||||||
|
|
||||||
<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.JouerSonTour3Controller">
|
<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 attaquer" />
|
||||||
<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 un joueur ?" />
|
||||||
|
@ -1,11 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
|
|
||||||
<?import javafx.scene.image.Image?>
|
|
||||||
<?import javafx.scene.image.ImageView?>
|
|
||||||
|
|
||||||
|
|
||||||
<ImageView fitHeight="33.0" fitWidth="200.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1">
|
|
||||||
<image>
|
|
||||||
<Image url="@dice.sprite.png" />
|
|
||||||
</image>
|
|
||||||
</ImageView>
|
|
Binary file not shown.
Before Width: | Height: | Size: 53 KiB |
@ -39,42 +39,42 @@ public class TestDatabse {
|
|||||||
@Test
|
@Test
|
||||||
void getEntireTableCartesLumiere() {
|
void getEntireTableCartesLumiere() {
|
||||||
System.out.println("Test getEntireTableCartesLumiere");
|
System.out.println("Test getEntireTableCartesLumiere");
|
||||||
t.remplirTableAllFrom("CartesLumiere");
|
t.fillList(QueryGenerator.AllFrom("CartesLumiere"));
|
||||||
Assert.assertFalse(t.isEmpty());
|
Assert.assertFalse(t.isEmpty());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void getEntireTableCartesTenebre() {
|
void getEntireTableCartesTenebre() {
|
||||||
System.out.println("Test getEntireTableCartesTenebre");
|
System.out.println("Test getEntireTableCartesTenebre");
|
||||||
t.remplirTableAllFrom("CartesTenebre");
|
t.fillList(QueryGenerator.AllFrom("CartesTenebre"));
|
||||||
Assert.assertFalse(t.isEmpty());
|
Assert.assertFalse(t.isEmpty());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void getEntireTableCartesVision() {
|
void getEntireTableCartesVision() {
|
||||||
System.out.println("Test getEntireTableCartesVision");
|
System.out.println("Test getEntireTableCartesVision");
|
||||||
t.remplirTableAllFrom("CartesVision");
|
t.fillList(QueryGenerator.AllFrom("CartesVision"));
|
||||||
Assert.assertFalse(t.isEmpty());
|
Assert.assertFalse(t.isEmpty());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void getEntireTableCartesPersonnage() {
|
void getEntireTableCartesPersonnage() {
|
||||||
System.out.println("Test getEntireTableCartesPersonnage");
|
System.out.println("Test getEntireTableCartesPersonnage");
|
||||||
t.remplirTableAllFrom("CartesPersonnage");
|
t.fillList(QueryGenerator.AllFrom("CartesPersonnage"));
|
||||||
Assert.assertFalse(t.isEmpty());
|
Assert.assertFalse(t.isEmpty());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void getEntireTableCartesDos() {
|
void getEntireTableCartesDos() {
|
||||||
System.out.println("Test getEntireTableCartesDos");
|
System.out.println("Test getEntireTableCartesDos");
|
||||||
t.remplirTableAllFrom("CartesDos");
|
t.fillList(QueryGenerator.AllFrom("CartesDos"));
|
||||||
Assert.assertFalse(t.isEmpty());
|
Assert.assertFalse(t.isEmpty());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void getEntireTableCartesAll() {
|
void getEntireTableCartesAll() {
|
||||||
System.out.println("Test getEntireTableCartesAll");
|
System.out.println("Test getEntireTableCartesAll");
|
||||||
t.remplirTableAllFrom("CartesAll");
|
t.fillList(QueryGenerator.AllFrom("CartesAll"));
|
||||||
Assert.assertFalse(t.isEmpty());
|
Assert.assertFalse(t.isEmpty());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user