diff --git a/lib/javafx-swt.jar b/lib/javafx-swt.jar new file mode 100644 index 0000000..ec237d4 Binary files /dev/null and b/lib/javafx-swt.jar differ diff --git a/lib/javafx.base.jar b/lib/javafx.base.jar new file mode 100644 index 0000000..017cdc7 Binary files /dev/null and b/lib/javafx.base.jar differ diff --git a/lib/javafx.controls.jar b/lib/javafx.controls.jar new file mode 100644 index 0000000..e427125 Binary files /dev/null and b/lib/javafx.controls.jar differ diff --git a/lib/javafx.fxml.jar b/lib/javafx.fxml.jar new file mode 100644 index 0000000..94934ae Binary files /dev/null and b/lib/javafx.fxml.jar differ diff --git a/lib/javafx.graphics.jar b/lib/javafx.graphics.jar new file mode 100644 index 0000000..f9d8f3a Binary files /dev/null and b/lib/javafx.graphics.jar differ diff --git a/lib/javafx.media.jar b/lib/javafx.media.jar new file mode 100644 index 0000000..7e4bdd7 Binary files /dev/null and b/lib/javafx.media.jar differ diff --git a/lib/javafx.properties b/lib/javafx.properties new file mode 100644 index 0000000..efec880 --- /dev/null +++ b/lib/javafx.properties @@ -0,0 +1,3 @@ +javafx.version=11.0.2 +javafx.runtime.version=11.0.2+1 +javafx.runtime.build=1 diff --git a/lib/javafx.swing.jar b/lib/javafx.swing.jar new file mode 100644 index 0000000..2900148 Binary files /dev/null and b/lib/javafx.swing.jar differ diff --git a/lib/javafx.web.jar b/lib/javafx.web.jar new file mode 100644 index 0000000..d75a805 Binary files /dev/null and b/lib/javafx.web.jar differ diff --git a/src/ihm/Dice.java b/src/ihm/Dice.java deleted file mode 100644 index 586c07a..0000000 --- a/src/ihm/Dice.java +++ /dev/null @@ -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(); - } -} \ No newline at end of file diff --git a/src/ihm/Main.java b/src/ihm/Main.java index c3cd587..297b9b5 100644 --- a/src/ihm/Main.java +++ b/src/ihm/Main.java @@ -15,7 +15,7 @@ public class Main extends Application { public void start(Stage primaryStage) throws Exception { System.out.println("Lancement de l'application"); - final URL fxmlURL = getClass().getResource("ressources/parametre.fxml"); // "ressources/Jouer_tour(1)lancer_des.fxml" + final URL fxmlURL = getClass().getResource("ressources/Menu.fxml"); // "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(); diff --git a/src/ihm/controller/PlateauController.java b/src/ihm/controller/PlateauController.java index 634cffb..9fa651e 100644 --- a/src/ihm/controller/PlateauController.java +++ b/src/ihm/controller/PlateauController.java @@ -4,6 +4,7 @@ package ihm.controller; import java.io.IOException; import java.net.URL; import java.util.ArrayList; +import java.util.HashMap; import java.util.List; import java.util.Locale; import java.util.Map; @@ -22,10 +23,11 @@ import javafx.scene.layout.AnchorPane; import javafx.scene.layout.HBox; import javafx.scene.layout.Pane; import javafx.scene.layout.VBox; +import main.GestionnaireJeu; import main.Joueur; -import main.View; public class PlateauController implements Initializable { + private List listJoueur = new ArrayList(); private List vboxJoueur = new ArrayList(); private List hboxJoueur = new ArrayList(); @@ -33,7 +35,10 @@ public class PlateauController implements Initializable { private List cartePerso = new ArrayList(); private List