Revert commit

This commit is contained in:
Paul Gross 2020-04-22 17:14:38 +02:00
commit de343d14e6
32 changed files with 632 additions and 270 deletions

View File

@ -10,7 +10,7 @@ import javafx.stage.Stage;
public class Main extends Application{
@Override
public void start(Stage primaryStage) throws Exception{
Parent root = FXMLLoader.load(getClass().getResource("ressources/Menu.fxml"));
Parent root = FXMLLoader.load(getClass().getResource("ressources/jouerSonTour6.fxml"));
primaryStage.setTitle("Shadow Hunters");
primaryStage.setScene(new Scene(root));
primaryStage.show();

View File

@ -1,16 +1,15 @@
package ihm;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.layout.Pane;
import javafx.stage.Modality;
import javafx.stage.Stage;
public class PopUp {
private Scene scene;
private Stage popupwindow;
private Pane pane;
public PopUp (Pane p, String titre) {
public PopUp (Parent p, String titre) {
popupwindow = new Stage();
popupwindow.initModality(Modality.APPLICATION_MODAL);

View File

@ -7,6 +7,7 @@ import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.Label;
import javafx.scene.layout.Pane;
import main.Joueur;
public class AfficherCarteController implements Initializable{
@ -14,13 +15,13 @@ public class AfficherCarteController implements Initializable{
@FXML private Label competence;
@FXML private Pane root;
private PlateauController plateau;
@Override
public void initialize(URL arg0, ResourceBundle arg1) {
System.out.println(root.getUserData());
//nom.setText((String) root.getUserData());
competence.setText("dfghjk");
}
public void showInformation(Joueur j) {
//nom.setText(j.getCartePersonnage().getNom());
//competence.setText(j.getCartePersonnage().getDescription());
}
}

View File

@ -0,0 +1,26 @@
package ihm.controller;
import java.io.IOException;
import java.net.URL;
import java.util.ResourceBundle;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.fxml.Initializable;
import javafx.scene.input.MouseEvent;
import javafx.scene.layout.BorderPane;
import javafx.scene.layout.Pane;
public class JouerSonTour1Controller implements Initializable{
@FXML private Pane rootPane;
@Override
public void initialize(URL arg0, ResourceBundle arg1) {
}
@FXML
public void lancerDes(MouseEvent mouseEvent) throws IOException{
Pane pane = FXMLLoader.load(getClass().getResource("../ressources/jouerSonTour2.fxml"));
rootPane.getChildren().setAll(pane);
}
}

View File

@ -0,0 +1,37 @@
package ihm.controller;
import java.io.IOException;
import java.net.URL;
import java.util.ResourceBundle;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.fxml.Initializable;
import javafx.scene.input.MouseEvent;
import javafx.scene.layout.BorderPane;
import javafx.scene.layout.Pane;
public class JouerSonTour2Controller implements Initializable{
@FXML private Pane rootPane;
@Override
public void initialize(URL arg0, ResourceBundle arg1) {
// TODO Auto-generated method stub
}
@FXML
public void ignorerEtape(MouseEvent mouseEvent) throws IOException{
Pane pane = FXMLLoader.load(getClass().getResource("../ressources/jouerSonTour3.fxml"));
rootPane.getChildren().setAll(pane);
}
@FXML
public void capaciteLieu(MouseEvent mouseEvent) throws IOException{
Pane pane = FXMLLoader.load(getClass().getResource("../ressources/jouerSonTour5.fxml"));
rootPane.getChildren().setAll(pane);
}
}

View File

@ -0,0 +1,35 @@
package ihm.controller;
import java.io.IOException;
import java.net.URL;
import java.util.ResourceBundle;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.fxml.Initializable;
import javafx.scene.input.MouseEvent;
import javafx.scene.layout.Pane;
public class JouerSonTour3Controller implements Initializable{
@FXML private Pane rootPane;
@Override
public void initialize(URL arg0, ResourceBundle arg1) {
System.out.println("nulle");
}
@FXML
public void choixJoueur(MouseEvent mouseEvent) throws IOException{
Pane pane = FXMLLoader.load(getClass().getResource("../ressources/jouerSonTour4.fxml"));
rootPane.getChildren().setAll(pane);
}
@FXML
public void equipementVole(MouseEvent mouseEvent) throws IOException{
Pane pane = FXMLLoader.load(getClass().getResource("../ressources/jouerSonTour5.fxml"));
rootPane.getChildren().setAll(pane);
}
}

View File

@ -0,0 +1,19 @@
package ihm.controller;
import java.net.URL;
import java.util.ResourceBundle;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.layout.Pane;
public class JouerSonTour4Controller implements Initializable{
@FXML private Pane rootPane;
@Override
public void initialize(URL arg0, ResourceBundle arg1) {
// TODO Auto-generated method stub
}
}

View File

@ -0,0 +1,29 @@
package ihm.controller;
import java.io.IOException;
import java.net.URL;
import java.util.ResourceBundle;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.fxml.Initializable;
import javafx.scene.input.MouseEvent;
import javafx.scene.layout.Pane;
public class JouerSonTour5Controller implements Initializable{
@FXML private Pane rootPane;
@Override
public void initialize(URL arg0, ResourceBundle arg1) {
// TODO Auto-generated method stub
}
@FXML
public void equipementVole(MouseEvent mouseEvent) throws IOException{
Pane pane = FXMLLoader.load(getClass().getResource("../ressources/jouerSonTour6.fxml"));
rootPane.getChildren().setAll(pane);
}
}

View File

@ -0,0 +1,35 @@
package ihm.controller;
import java.io.IOException;
import java.net.URL;
import java.util.ResourceBundle;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.fxml.Initializable;
import javafx.scene.input.MouseEvent;
import javafx.scene.layout.Pane;
public class JouerSonTour6Controller implements Initializable{
@FXML private Pane rootPane;
@Override
public void initialize(URL arg0, ResourceBundle arg1) {
// TODO Auto-generated method stub
}
@FXML
public void piocherVision(MouseEvent mouseEvent) throws IOException{
Pane pane = FXMLLoader.load(getClass().getResource("../ressources/jouer_Son_Tour_piocher_vision.fxml"));
rootPane.getChildren().setAll(pane);
}
@FXML
public void piocherTenebre(MouseEvent mouseEvent) throws IOException{
Pane pane = FXMLLoader.load(getClass().getResource("../ressources/jouer_Son_Tour_piocher_lum_et_ten.fxml"));
rootPane.getChildren().setAll(pane);
}
}

View File

@ -0,0 +1,29 @@
package ihm.controller;
import java.io.IOException;
import java.net.URL;
import java.util.ResourceBundle;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.fxml.Initializable;
import javafx.scene.input.MouseEvent;
import javafx.scene.layout.Pane;
public class JouerSonTourDonnerVisionController implements Initializable{
@FXML private Pane rootPane;
@Override
public void initialize(URL arg0, ResourceBundle arg1) {
// TODO Auto-generated method stub
}
@FXML
public void attaquer(MouseEvent mouseEvent) throws IOException{
Pane pane = FXMLLoader.load(getClass().getResource("../ressources/jouer_Son_Tour_recevoir_blessure.fxml"));
rootPane.getChildren().setAll(pane);
}
}

View File

@ -1,5 +1,7 @@
package ihm.controller;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.net.URL;
import java.util.ResourceBundle;
@ -20,8 +22,14 @@ public class MenuController implements Initializable{
@Override
public void initialize(URL arg0, ResourceBundle arg1) {
// TODO Auto-generated method stub
//Image image = new Image("../ressources/img/logo.png");
//titre.setImage(image);
FileInputStream input;
try {
input = new FileInputStream("src\\ihm\\ressources\\img\\logo.png");
Image image = new Image(input);
titre.setImage(image);
} catch (FileNotFoundException e) {
e.printStackTrace();
}
}
@FXML

View File

@ -0,0 +1,19 @@
package ihm.controller;
import java.net.URL;
import java.util.ResourceBundle;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.layout.Pane;
public class PiocherLumiereTenebreController implements Initializable{
@FXML private Pane rootPane;
@Override
public void initialize(URL arg0, ResourceBundle arg1) {
// TODO Auto-generated method stub
}
}

View File

@ -0,0 +1,28 @@
package ihm.controller;
import java.io.IOException;
import java.net.URL;
import java.util.ResourceBundle;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.fxml.Initializable;
import javafx.scene.input.MouseEvent;
import javafx.scene.layout.Pane;
public class PiocherVisionController implements Initializable{
@FXML private Pane rootPane;
@Override
public void initialize(URL arg0, ResourceBundle arg1) {
// TODO Auto-generated method stub
}
@FXML
public void voirCarte(MouseEvent mouseEvent) throws IOException{
Pane pane = FXMLLoader.load(getClass().getResource("../ressources/jouer_Son_Tour_donner_vision.fxml"));
rootPane.getChildren().setAll(pane);
}
}

View File

@ -11,17 +11,14 @@ import ihm.PopUp;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.fxml.Initializable;
import javafx.scene.Parent;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.layout.Pane;
import javafx.scene.layout.VBox;
import javafx.scene.layout.BorderPane;
import javafx.scene.layout.HBox;
import main.Joueur;
public class PlateauController implements Initializable {
@FXML private BorderPane root;
private List<Joueur> listJoueur = new ArrayList<Joueur>();
private List<VBox> vboxJoueur = new ArrayList<VBox>();
private List<Button> btnRevelation = new ArrayList<Button>();
@ -44,9 +41,6 @@ public class PlateauController implements Initializable {
*/
@Override
public void initialize(URL arg0, ResourceBundle arg1) {
// initialisation des joueurs
attribuerPerso(listJoueur);
//initialisation des attributs des joueurs
this.vboxJoueur.add(joueur1);
this.vboxJoueur.add(joueur2);
@ -65,13 +59,20 @@ public class PlateauController implements Initializable {
btnRevelation.add((Button) enfant.getChildren().get(1));
}
//initilaisation des boutons se reveler
int i = 0;
for (Button b : btnRevelation) {
b.setOnAction(e -> {try {seReveler(null);} catch (IOException e1) {e1.printStackTrace();}});
int compteur = i;
b.setOnAction(e -> {try {seReveler(compteur);} catch (IOException e1) {e1.printStackTrace();}});
i++;
}
//initialisation des bouton carte personnage
int j = 0;
for (Button b : btnCartePerso) {
b.setOnAction(e -> {try {consulterSaCarte(null);} catch (IOException e1) {e1.printStackTrace();}});
int compteur = j;
b.setOnAction(e -> {try {consulterSaCarte(compteur);} catch (IOException e1) {e1.printStackTrace();}});
j++;
}
//initialisation nom personnage
for (Label l : nomPerso) {
l.setText("???");
@ -87,10 +88,15 @@ public class PlateauController implements Initializable {
*
* @param j : Le joueur sur lequel on a cliqué
*/
public void seReveler(Joueur j) throws IOException {
System.out.println("Le joueur ... se revèle");
Pane pane = FXMLLoader.load(getClass().getResource("../ressources/Reveler_son_identite.fxml"));
PopUp popup = new PopUp(pane, "reveler son identité");
public void seReveler(int numJoueur) throws IOException {
System.out.println(listJoueur.get(numJoueur).getNom() + " se revele");
FXMLLoader loader = new FXMLLoader(getClass().getResource("../ressources/Reveler_son_identite.fxml"));
Parent root = loader.load();
RevelationController rc = loader.getController();
rc.showInformation(listJoueur.get(numJoueur));
PopUp popup = new PopUp(root, "Consulter sa carte");
popup.display();
}
@ -99,23 +105,28 @@ public class PlateauController implements Initializable {
*
* @param j : Le joueur sur lequel on a cliqué
*/
public void consulterSaCarte(Joueur j) throws IOException {
System.out.println("Le joueur ... consulte sa carte");
Pane pane = FXMLLoader.load(getClass().getResource("../ressources/afficher_carte_perso.fxml"));
pane.setUserData("blblblb");
System.out.println(pane.getUserData());
PopUp popup = new PopUp(pane, "Consulter sa carte");
public void consulterSaCarte(int numJoueur) throws IOException {
System.out.println(listJoueur.get(numJoueur).getNom() + " consulte sa carte");
FXMLLoader loader = new FXMLLoader(getClass().getResource("../ressources/afficher_carte_perso.fxml"));
Parent root = loader.load();
AfficherCarteController acc = loader.getController();
acc.showInformation(listJoueur.get(numJoueur));
PopUp popup = new PopUp(root, "Consulter sa carte");
popup.display();
}
public void showInformation(List<Joueur> j) {
System.out.println("Ecriture des noms des joueurs");
System.out.println("\tEcriture des noms des joueurs");
for (int i=0; i<j.size(); i++) {
nomJoueur.get(i).setText(j.get(i).getNom());
if (j.get(i) != null)
nomJoueur.get(i).setText(j.get(i).getNom());
else {
vboxJoueur.get(i).setVisible(false);
}
}
}
public void attribuerPerso(List<Joueur> lj) {
listJoueur = j;
}
}

View File

@ -78,6 +78,7 @@ public class PlayersController implements Initializable{
@FXML
public void commencerJeux(MouseEvent mouseEvent) throws IOException{
//ajout des joueurs finalement selectionner
int nbJoueur = 0;
for (HBox hb : ligne) {
TextField tf = (TextField) hb.getChildren().get(0);
CheckBox cb = (CheckBox) hb.getChildren().get(2);
@ -87,13 +88,13 @@ public class PlayersController implements Initializable{
j = new JoueurVirtuel(tf.getText());
else
j = new Joueur(tf.getText());
joueur.add(j);
}
nbJoueur++;
}else j = null;
joueur.add(j);
}
if (joueur.size() <4) {
Alert alert = new Alert(AlertType.WARNING, "Vous avez moins de 4 joueurs !");
if (nbJoueur <4) {
Alert alert = new Alert(AlertType.WARNING, "Il faut au moins de 4 joueurs !");
alert.showAndWait();
}else {
System.out.println("Lancement du jeu...");
@ -121,7 +122,7 @@ public class PlayersController implements Initializable{
}
/**
* Retire le joueur pr<EFBFBD>cedemnt ajouter
* Retire le joueur précedemnt ajouter
*
* @param indice : pour savoir quel bouton a <EFBFBD>t<EFBFBD> cliqu<EFBFBD>
*/

View File

@ -0,0 +1,19 @@
package ihm.controller;
import java.net.URL;
import java.util.ResourceBundle;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.layout.Pane;
public class RecevoirBlessureController implements Initializable{
@FXML private Pane rootPane;
@Override
public void initialize(URL arg0, ResourceBundle arg1) {
// TODO Auto-generated method stub
}
}

View File

@ -0,0 +1,27 @@
package ihm.controller;
import java.net.URL;
import java.util.ResourceBundle;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.Label;
import main.Joueur;
public class RevelationController implements Initializable{
@FXML private Label nomJoueur;
@FXML private Label nomPerso;
@FXML private Label factionPerso;
@Override
public void initialize(URL arg0, ResourceBundle arg1) {
}
public void showInformation(Joueur j) {
nomJoueur.setText(j.getNom());
//nomPerso.setText(j.getCartePersonnage().getNom());
//factionPerso.setText(j.getCartePersonnage().getDescription());
}
}

View File

@ -11,17 +11,132 @@
<?import javafx.scene.text.Font?>
<BorderPane fx:id="rootPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="800.0" prefWidth="1280.0" styleClass="background" stylesheets="@style/menu.css" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ihm.controller.PlayersController">
<bottom>
<Button fx:id="btnCommencer" mnemonicParsing="false" onMouseClicked="#commencerJeux" styleClass="bouton" stylesheets="@style/menu.css" text="Commencer la partie" BorderPane.alignment="CENTER">
<BorderPane.margin>
<Insets bottom="10.0" />
</BorderPane.margin>
<font>
<Font size="24.0" />
</font></Button>
</bottom>
<top>
<VBox alignment="CENTER" prefHeight="119.0" prefWidth="600.0" BorderPane.alignment="CENTER">
<left>
<VBox alignment="CENTER" prefHeight="688.0" prefWidth="240.0" BorderPane.alignment="CENTER">
<children>
<HBox fx:id="hb5" alignment="CENTER" prefHeight="67.0" prefWidth="340.0" rotate="90.0">
<children>
<TextField>
<font>
<Font size="24.0" />
</font>
</TextField>
<Button mnemonicParsing="false" prefHeight="55.0" prefWidth="100.0" styleClass="bouton" stylesheets="@style/menu.css" text="+">
<font>
<Font size="24.0" />
</font>
<HBox.margin>
<Insets left="10.0" right="10.0" />
</HBox.margin>
<padding>
<Insets right="5.0" />
</padding>
</Button>
<CheckBox mnemonicParsing="false">
<font>
<Font size="24.0" />
</font>
</CheckBox>
</children>
<VBox.margin>
<Insets bottom="150.0" left="-100.0" />
</VBox.margin>
</HBox>
<HBox fx:id="hb7" alignment="CENTER" rotate="90.0">
<children>
<TextField prefHeight="51.0" prefWidth="298.0">
<font>
<Font size="24.0" />
</font>
</TextField>
<Button mnemonicParsing="false" prefHeight="55.0" prefWidth="100.0" styleClass="bouton" stylesheets="@style/menu.css" text="+">
<font>
<Font size="24.0" />
</font>
<HBox.margin>
<Insets left="10.0" right="10.0" />
</HBox.margin>
<padding>
<Insets right="5.0" />
</padding>
</Button>
<CheckBox mnemonicParsing="false">
<font>
<Font size="24.0" />
</font>
</CheckBox>
</children>
<VBox.margin>
<Insets left="-100.0" top="200.0" />
</VBox.margin>
</HBox>
</children>
</VBox>
</left>
<right>
<VBox alignment="CENTER" prefHeight="688.0" prefWidth="248.0" BorderPane.alignment="CENTER">
<children>
<HBox fx:id="hb6" alignment="CENTER" prefHeight="100.0" prefWidth="200.0" rotate="270.0">
<children>
<TextField>
<font>
<Font size="24.0" />
</font>
</TextField>
<Button mnemonicParsing="false" prefHeight="55.0" prefWidth="100.0" styleClass="bouton" stylesheets="@style/menu.css" text="+">
<font>
<Font size="24.0" />
</font>
<HBox.margin>
<Insets left="10.0" right="10.0" />
</HBox.margin>
<padding>
<Insets right="5.0" />
</padding>
</Button>
<CheckBox mnemonicParsing="false">
<font>
<Font size="24.0" />
</font>
</CheckBox>
</children>
<VBox.margin>
<Insets bottom="150.0" right="-100.0" />
</VBox.margin>
</HBox>
<HBox fx:id="hb8" alignment="CENTER" prefHeight="100.0" prefWidth="200.0" rotate="270.0">
<children>
<TextField>
<font>
<Font size="24.0" />
</font>
</TextField>
<Button mnemonicParsing="false" prefHeight="55.0" prefWidth="100.0" styleClass="bouton" stylesheets="@style/menu.css" text="+">
<font>
<Font size="24.0" />
</font>
<HBox.margin>
<Insets left="10.0" right="10.0" />
</HBox.margin>
<padding>
<Insets right="5.0" />
</padding>
</Button>
<CheckBox mnemonicParsing="false">
<font>
<Font size="24.0" />
</font>
</CheckBox>
</children>
<VBox.margin>
<Insets right="-100.0" top="150.0" />
</VBox.margin>
</HBox>
</children>
</VBox>
</right>
<center>
<VBox alignment="CENTER" prefHeight="486.0" prefWidth="392.0" BorderPane.alignment="CENTER">
<children>
<Label styleClass="titre" stylesheets="@style/menu.css" text="Entrez le nom des joueurs">
<font>
@ -33,199 +148,129 @@
<Font size="36.0" />
</font>
</Label>
<Label styleClass="titre" stylesheets="@style/menu.css" text="Cochez la case pour que le joueur soit un joueur virtuel">
<Label styleClass="titre" stylesheets="@style/menu.css" text="Cochez la case pour avoir un joueur virtuel">
<font>
<Font size="36.0" />
</font></Label>
<Button fx:id="btnCommencer" mnemonicParsing="false" onMouseClicked="#commencerJeux" styleClass="bouton" stylesheets="@style/menu.css" text="Commencer la partie">
<font>
<Font size="24.0" />
</font>
<VBox.margin>
<Insets top="20.0" />
</VBox.margin>
</Button>
</children>
</VBox>
</center>
<top>
<HBox alignment="CENTER" prefHeight="110.0" prefWidth="1280.0" BorderPane.alignment="CENTER">
<children>
<HBox fx:id="hb1" alignment="CENTER" rotate="180.0">
<children>
<TextField>
<font>
<Font size="24.0" />
</font>
</TextField>
<Button mnemonicParsing="false" prefHeight="55.0" prefWidth="55.0" styleClass="bouton" stylesheets="@style/menu.css" text="+">
<font>
<Font size="24.0" />
</font>
<HBox.margin>
<Insets left="10.0" right="10.0" />
</HBox.margin>
</Button>
<CheckBox mnemonicParsing="false">
<font>
<Font size="24.0" />
</font>
</CheckBox>
</children>
</HBox>
<HBox fx:id="hb2" alignment="CENTER" rotate="180.0">
<children>
<TextField>
<font>
<Font size="24.0" />
</font>
</TextField>
<Button mnemonicParsing="false" prefHeight="55.0" prefWidth="55.0" styleClass="bouton" stylesheets="@style/menu.css" text="+">
<font>
<Font size="24.0" />
</font>
<HBox.margin>
<Insets left="10.0" right="10.0" />
</HBox.margin>
</Button>
<CheckBox mnemonicParsing="false">
<font>
<Font size="24.0" />
</font>
</CheckBox>
</children>
<HBox.margin>
<Insets left="30.0" />
</HBox.margin>
</HBox>
</children>
</HBox>
</top>
<left>
<VBox alignment="CENTER" prefHeight="559.0" prefWidth="642.0" BorderPane.alignment="CENTER">
<bottom>
<VBox alignment="CENTER" prefHeight="94.0" prefWidth="1280.0" BorderPane.alignment="CENTER">
<children>
<HBox fx:id="hb1" alignment="CENTER" prefHeight="100.0" prefWidth="200.0">
<HBox alignment="CENTER" prefHeight="100.0" prefWidth="200.0">
<children>
<TextField>
<font>
<Font size="24.0" />
</font>
</TextField>
<Button mnemonicParsing="false" styleClass="bouton" stylesheets="@style/menu.css" text="+">
<font>
<Font size="24.0" />
</font>
<HBox fx:id="hb3" alignment="CENTER">
<children>
<TextField prefHeight="51.0" prefWidth="298.0">
<font>
<Font size="24.0" />
</font>
</TextField>
<Button mnemonicParsing="false" prefHeight="55.0" prefWidth="55.0" styleClass="bouton" stylesheets="@style/menu.css" text="+">
<font>
<Font size="24.0" />
</font>
<HBox.margin>
<Insets left="10.0" right="10.0" />
</HBox.margin>
</Button>
<CheckBox mnemonicParsing="false">
<font>
<Font size="24.0" />
</font>
</CheckBox>
</children>
</HBox>
<HBox fx:id="hb4" alignment="CENTER">
<children>
<TextField>
<font>
<Font size="24.0" />
</font>
</TextField>
<Button mnemonicParsing="false" prefHeight="55.0" prefWidth="55.0" styleClass="bouton" stylesheets="@style/menu.css" text="+">
<font>
<Font size="24.0" />
</font>
<HBox.margin>
<Insets left="10.0" right="10.0" />
</HBox.margin>
</Button>
<CheckBox mnemonicParsing="false">
<font>
<Font size="24.0" />
</font>
</CheckBox>
</children>
<HBox.margin>
<Insets left="10.0" right="10.0" />
<Insets left="30.0" />
</HBox.margin>
</Button>
<CheckBox mnemonicParsing="false">
<font>
<Font size="24.0" />
</font>
</CheckBox>
</children>
</HBox>
<HBox fx:id="hb2" alignment="CENTER" prefHeight="100.0" prefWidth="200.0">
<children>
<TextField>
<font>
<Font size="24.0" />
</font>
</TextField>
<Button mnemonicParsing="false" styleClass="bouton" stylesheets="@style/menu.css" text="+">
<font>
<Font size="24.0" />
</font>
<HBox.margin>
<Insets left="10.0" right="10.0" />
</HBox.margin>
</Button>
<CheckBox mnemonicParsing="false">
<font>
<Font size="24.0" />
</font>
</CheckBox>
</children>
</HBox>
<HBox fx:id="hb3" alignment="CENTER" prefHeight="100.0" prefWidth="200.0">
<children>
<TextField>
<font>
<Font size="24.0" />
</font>
</TextField>
<Button mnemonicParsing="false" styleClass="bouton" stylesheets="@style/menu.css" text="+">
<font>
<Font size="24.0" />
</font>
<HBox.margin>
<Insets left="10.0" right="10.0" />
</HBox.margin>
</Button>
<CheckBox mnemonicParsing="false">
<font>
<Font size="24.0" />
</font>
</CheckBox>
</children>
</HBox>
<HBox fx:id="hb4" alignment="CENTER" prefHeight="100.0" prefWidth="200.0">
<children>
<TextField>
<font>
<Font size="24.0" />
</font>
</TextField>
<Button mnemonicParsing="false" styleClass="bouton" stylesheets="@style/menu.css" text="+">
<font>
<Font size="24.0" />
</font>
<HBox.margin>
<Insets left="10.0" right="10.0" />
</HBox.margin>
</Button>
<CheckBox mnemonicParsing="false">
<font>
<Font size="24.0" />
</font>
</CheckBox>
</HBox>
</children>
</HBox>
</children>
</VBox>
</left>
<right>
<VBox alignment="CENTER" prefHeight="559.0" prefWidth="694.0" BorderPane.alignment="CENTER">
<children>
<HBox fx:id="hb5" alignment="CENTER" prefHeight="100.0" prefWidth="200.0">
<children>
<TextField>
<font>
<Font size="24.0" />
</font>
</TextField>
<Button mnemonicParsing="false" styleClass="bouton" stylesheets="@style/menu.css" text="+">
<font>
<Font size="24.0" />
</font>
<HBox.margin>
<Insets left="10.0" right="10.0" />
</HBox.margin>
</Button>
<CheckBox mnemonicParsing="false">
<font>
<Font size="24.0" />
</font>
</CheckBox>
</children>
</HBox>
<HBox fx:id="hb6" alignment="CENTER" prefHeight="100.0" prefWidth="200.0">
<children>
<TextField>
<font>
<Font size="24.0" />
</font>
</TextField>
<Button mnemonicParsing="false" styleClass="bouton" stylesheets="@style/menu.css" text="+">
<font>
<Font size="24.0" />
</font>
<HBox.margin>
<Insets left="10.0" right="10.0" />
</HBox.margin>
</Button>
<CheckBox mnemonicParsing="false">
<font>
<Font size="24.0" />
</font>
</CheckBox>
</children>
</HBox>
<HBox fx:id="hb7" alignment="CENTER" prefHeight="100.0" prefWidth="200.0">
<children>
<TextField>
<font>
<Font size="24.0" />
</font>
</TextField>
<Button mnemonicParsing="false" styleClass="bouton" stylesheets="@style/menu.css" text="+">
<font>
<Font size="24.0" />
</font>
<HBox.margin>
<Insets left="10.0" right="10.0" />
</HBox.margin>
</Button>
<CheckBox mnemonicParsing="false">
<font>
<Font size="24.0" />
</font>
</CheckBox>
</children>
</HBox>
<HBox fx:id="hb8" alignment="CENTER" prefHeight="100.0" prefWidth="200.0">
<children>
<TextField>
<font>
<Font size="24.0" />
</font>
</TextField>
<Button mnemonicParsing="false" styleClass="bouton" stylesheets="@style/menu.css" text="+">
<font>
<Font size="24.0" />
</font>
<HBox.margin>
<Insets left="10.0" right="10.0" />
</HBox.margin>
</Button>
<CheckBox mnemonicParsing="false">
<font>
<Font size="24.0" />
</font>
</CheckBox>
</children>
</HBox>
</children>
</VBox>
</right>
</bottom>
</BorderPane>

View File

@ -8,8 +8,7 @@
<?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">
<Pane fx:id="rootPane" 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" fx:controller="ihm.controller.JouerSonTourDonnerVisionController">
<children>
<VBox prefHeight="400.0" prefWidth="600.0">
<children>
@ -17,7 +16,7 @@
<children>
<HBox alignment="CENTER" prefHeight="100.0" prefWidth="200.0">
<children>
<Button mnemonicParsing="false" text="Joueur 1" />
<Button mnemonicParsing="false" onMouseClicked="#attaquer" text="Joueur 1" />
</children>
</HBox>
<HBox alignment="CENTER" prefHeight="100.0" prefWidth="200.0">

View File

@ -7,8 +7,7 @@
<?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">
<Pane fx:id="rootPane" 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" fx:controller="ihm.controller.PiocherLumiereTenebreController">
<children>
<VBox prefHeight="400.0" prefWidth="600.0">
<children>

View File

@ -8,7 +8,7 @@
<?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">
<Pane fx:id="rootPane" 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" fx:controller="ihm.controller.PiocherVisionController">
<children>
<VBox prefHeight="400.0" prefWidth="600.0">
<children>
@ -37,7 +37,7 @@
</HBox>
<HBox alignment="CENTER" prefHeight="69.0" prefWidth="600.0">
<children>
<Button mnemonicParsing="false" text="Voir carte" />
<Button mnemonicParsing="false" onMouseClicked="#voirCarte" text="Voir carte" />
</children>
</HBox>
</children>

View File

@ -5,8 +5,7 @@
<?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">
<Pane fx:id="rootPane" 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" fx:controller="ihm.controller.RecevoirBlessureController">
<children>
<HBox alignment="CENTER" layoutY="1.0" prefHeight="400.0" prefWidth="600.0">
<children>

View File

@ -7,7 +7,7 @@
<?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">
<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" fx:controller="ihm.controller.RevelationController">
<children>
<Pane layoutX="33.0" layoutY="41.0" prefHeight="325.0" prefWidth="561.0" style="-fx-border-color: blue;">
<children>
@ -15,7 +15,7 @@
<children>
<HBox prefHeight="36.0" prefWidth="334.0">
<children>
<Label prefHeight="35.0" prefWidth="75.0" text="Joueur x " textFill="WHITE">
<Label fx:id="nomJoueur" prefHeight="35.0" prefWidth="75.0" text="Joueur x " textFill="WHITE">
<font>
<Font size="18.0" />
</font>
@ -34,7 +34,7 @@
<Font size="18.0" />
</font>
</Label>
<Label prefHeight="34.0" prefWidth="182.0" text="*nom de personnage*" textFill="WHITE">
<Label fx:id="nomPerso" prefHeight="34.0" prefWidth="182.0" text="*nom de personnage*" textFill="WHITE">
<font>
<Font size="18.0" />
</font>
@ -48,7 +48,7 @@
<Font size="18.0" />
</font>
</Label>
<Label prefHeight="34.0" prefWidth="233.0" text="*insérer le nom de la faction*" textFill="WHITE">
<Label fx:id="factionPerso" prefHeight="34.0" prefWidth="233.0" text="*insérer le nom de la faction*" textFill="WHITE">
<font>
<Font size="18.0" />
</font>

View File

@ -7,7 +7,7 @@
<?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">
<Pane fx:id="rootPane" 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" fx:controller="ihm.controller.JouerSonTour1Controller">
<children>
<Label layoutX="265.0" layoutY="29.0" text="C'est au tour du ">
<font>
@ -16,7 +16,7 @@
</Label>
<Rectangle arcHeight="5.0" arcWidth="5.0" fill="DODGERBLUE" height="200.0" layoutX="221.0" layoutY="135.0" stroke="BLACK" strokeType="INSIDE" width="200.0" />
<Polygon fill="DODGERBLUE" layoutX="551.0" layoutY="216.0" points="-75.79998779296875, 98.80001831054688, 97.0, 98.80001831054688, 8.20001220703125, -59.199981689453125" stroke="BLACK" strokeType="INSIDE" />
<Button layoutX="401.0" layoutY="394.0" mnemonicParsing="false" text="Lancer les dés" />
<Button layoutX="401.0" layoutY="394.0" mnemonicParsing="false" onMouseClicked="#lancerDes" text="Lancer les dés" />
<Label layoutX="275.0" layoutY="222.0" text="Score dés 1">
<font>
<Font size="18.0" />

View File

@ -6,8 +6,7 @@
<?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">
<Pane fx:id="rootPane" 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" fx:controller="ihm.controller.JouerSonTour2Controller">
<children>
<Label layoutX="355.0" layoutY="172.0" text="Description capacité de la carte lieux ">
<font>
@ -15,8 +14,8 @@
</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 la capacité du lieux" />
<Button layoutX="542.0" layoutY="242.0" mnemonicParsing="false" text="Sauter cette étape" />
<Button layoutX="348.0" layoutY="242.0" mnemonicParsing="false" onMouseClicked="#capaciteLieu" text="Utiliser la capacité du lieux" />
<Button layoutX="542.0" layoutY="242.0" mnemonicParsing="false" onMouseClicked="#ignorerEtape" text="Sauter cette étape" />
<Label layoutX="168.0" layoutY="273.0" text="Carte lieux" />
</children>
</Pane>

View File

@ -6,12 +6,11 @@
<?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">
<Pane fx:id="rootPane" 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" fx:controller="ihm.controller.JouerSonTour3Controller">
<children>
<HBox alignment="CENTER" prefHeight="100.0" prefWidth="661.0" spacing="60.0">
<children>
<Button mnemonicParsing="false" text="Joueur 1" />
<Button mnemonicParsing="false" onMouseClicked="#choixJoueur" text="Joueur 1" />
<Button mnemonicParsing="false" text="Joueur 2" />
<Button mnemonicParsing="false" text="Joueur 3" />
<Button mnemonicParsing="false" text="Joueur 4" />

View File

@ -7,7 +7,7 @@
<?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">
<Pane fx:id="rootPane" 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" fx:controller="ihm.controller.JouerSonTour4Controller">
<children>
<Label layoutX="401.0" layoutY="29.0" text="attaque">
<font>

View File

@ -6,8 +6,7 @@
<?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">
<Pane fx:id="rootPane" 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" fx:controller="ihm.controller.JouerSonTour5Controller">
<children>
<HBox layoutX="11.0" layoutY="14.0" prefHeight="60.0" prefWidth="345.0" spacing="30.0">
<children>

View File

@ -7,8 +7,7 @@
<?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">
<Pane fx:id="rootPane" 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" fx:controller="ihm.controller.JouerSonTour6Controller">
<children>
<HBox alignment="CENTER" layoutX="97.0" layoutY="49.0" prefHeight="340.0" prefWidth="489.0" spacing="60.0">
<children>
@ -19,9 +18,9 @@
</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 ténébre" />
<Button mnemonicParsing="false" text="Carte lumière" />
<Button mnemonicParsing="false" onMouseClicked="#piocherVision" text="Carte vision" />
<Button mnemonicParsing="false" onMouseClicked="#piocherTenebre" text="Carte ténébre" />
<Button mnemonicParsing="false" onMouseClicked="#piocherTenebre" text="Carte lumière" />
</children>
</VBox>
</children>

View File

@ -196,7 +196,6 @@ public class Joueur {
public String getNom() {
return this.nom;
}
public void reveal() {
this.revele = true;
}

View File

@ -14,11 +14,6 @@ public class Vampire extends CartePersonnage{
//
}
public void utiliser(Joueur j)
{
//this.getEffet().utiliser()
}
//m<EFBFBD>thode
public void attaquer(Joueur j) {
@ -26,4 +21,10 @@ public class Vampire extends CartePersonnage{
//utiliser(this.joueur);
}
@Override
public void utiliser() {
// TODO Auto-generated method stub
}
}

View File

@ -33,7 +33,7 @@ class VampireTest {
joueurs.add(j2);
p = new Plateau(joueurs);
v = new Vampire(j1);
v = new Vampire("Vampire",12,j1,null);
a = new Allie(j2);
}
@ -59,6 +59,7 @@ class VampireTest {
j2.setStat(Joueur.PLAYER_HP, pvAllieBase);
p.attaquer(j1, j2);
// Vampire n'a pas récupéré de pv's lors de son attaque
assertTrue(j1.getStat(Joueur.PLAYER_HP) == 0);