diff --git a/2A/Java/tp/JavaFX/1_tp/Sujet.md b/2A/Java/tp/JavaFX/1_tp/Sujet.md
new file mode 100644
index 0000000..2770a1a
--- /dev/null
+++ b/2A/Java/tp/JavaFX/1_tp/Sujet.md
@@ -0,0 +1,4 @@
+# TP1 - JavaFX
+
+## Sujet
+
diff --git a/2A/Java/tp/JavaFX/1_tp/TP1/.idea/misc.xml b/2A/Java/tp/JavaFX/1_tp/TP1/.idea/misc.xml
index 5273917..5295b2c 100644
--- a/2A/Java/tp/JavaFX/1_tp/TP1/.idea/misc.xml
+++ b/2A/Java/tp/JavaFX/1_tp/TP1/.idea/misc.xml
@@ -1,6 +1,6 @@
-
+
\ No newline at end of file
diff --git a/2A/Java/tp/JavaFX/1_tp/TP1/TP1.iml b/2A/Java/tp/JavaFX/1_tp/TP1/TP1.iml
index 6c67054..075d851 100644
--- a/2A/Java/tp/JavaFX/1_tp/TP1/TP1.iml
+++ b/2A/Java/tp/JavaFX/1_tp/TP1/TP1.iml
@@ -3,6 +3,7 @@
+
diff --git a/2A/Java/tp/JavaFX/1_tp/TP1/rsrc/fxml/Fenetre.fxml b/2A/Java/tp/JavaFX/1_tp/TP1/rsrc/fxml/Fenetre.fxml
index e69de29..e91e0f5 100644
--- a/2A/Java/tp/JavaFX/1_tp/TP1/rsrc/fxml/Fenetre.fxml
+++ b/2A/Java/tp/JavaFX/1_tp/TP1/rsrc/fxml/Fenetre.fxml
@@ -0,0 +1,55 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/2A/Java/tp/JavaFX/1_tp/TP1/src/launch/Launch.java b/2A/Java/tp/JavaFX/1_tp/TP1/src/launch/Launch.java
index 5c7ca32..2004323 100644
--- a/2A/Java/tp/JavaFX/1_tp/TP1/src/launch/Launch.java
+++ b/2A/Java/tp/JavaFX/1_tp/TP1/src/launch/Launch.java
@@ -1,12 +1,24 @@
package launch;
import javafx.application.Application;
+import javafx.fxml.FXMLLoader;
+import javafx.scene.Parent;
+import javafx.scene.Scene;
import javafx.stage.Stage;
+import view.Fenetre;
+
+import java.io.IOException;
+import java.util.Objects;
public class Launch extends Application {
+ Parent root = FXMLLoader.load(getClass().getResource("/fxml/Fenetre.fxml"));
+
+ public Launch() throws IOException {
+ }
@Override
public void start(Stage primaryStage) throws Exception {
+ primaryStage.setScene(new Scene(root));
primaryStage.show();
}
-}
+}
\ No newline at end of file
diff --git a/2A/Java/tp/JavaFX/1_tp/TP1/src/view/Fenetre.java b/2A/Java/tp/JavaFX/1_tp/TP1/src/view/Fenetre.java
new file mode 100644
index 0000000..5a247d0
--- /dev/null
+++ b/2A/Java/tp/JavaFX/1_tp/TP1/src/view/Fenetre.java
@@ -0,0 +1,13 @@
+package view;
+
+import javafx.fxml.FXML;
+import javafx.fxml.FXMLLoader;
+
+import java.awt.*;
+
+public class Fenetre {
+ @FXML
+ private Button myButton = new Button();
+
+
+}
diff --git a/2A/Java/tp/JavaFX/tpjeude/.gitignore b/2A/Java/tp/JavaFX/tpjeude/.gitignore
new file mode 100644
index 0000000..35e755d
--- /dev/null
+++ b/2A/Java/tp/JavaFX/tpjeude/.gitignore
@@ -0,0 +1,133 @@
+# ---> JetBrains
+# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
+# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
+
+# User-specific stuff
+.idea/**/workspace.xml
+.idea/**/tasks.xml
+.idea/**/usage.statistics.xml
+.idea/**/dictionaries
+.idea/**/shelf
+
+# AWS User-specific
+.idea/**/aws.xml
+
+# Generated files
+.idea/**/contentModel.xml
+
+# Sensitive or high-churn files
+.idea/**/dataSources/
+.idea/**/dataSources.ids
+.idea/**/dataSources.local.xml
+.idea/**/sqlDataSources.xml
+.idea/**/dynamic.xml
+.idea/**/uiDesigner.xml
+.idea/**/dbnavigator.xml
+
+# Gradle
+.idea/**/gradle.xml
+.idea/**/libraries
+
+# Gradle and Maven with auto-import
+# When using Gradle or Maven with auto-import, you should exclude module files,
+# since they will be recreated, and may cause churn. Uncomment if using
+# auto-import.
+# .idea/artifacts
+# .idea/compiler.xml
+# .idea/jarRepositories.xml
+# .idea/modules.xml
+# .idea/*.iml
+# .idea/modules
+# *.iml
+# *.ipr
+
+# CMake
+cmake-build-*/
+
+# Mongo Explorer plugin
+.idea/**/mongoSettings.xml
+
+# File-based project format
+*.iws
+
+# IntelliJ
+out/
+
+# mpeltonen/sbt-idea plugin
+.idea_modules/
+
+# JIRA plugin
+atlassian-ide-plugin.xml
+
+# Cursive Clojure plugin
+.idea/replstate.xml
+
+# SonarLint plugin
+.idea/sonarlint/
+
+# Crashlytics plugin (for Android Studio and IntelliJ)
+com_crashlytics_export_strings.xml
+crashlytics.properties
+crashlytics-build.properties
+fabric.properties
+
+# Editor-based Rest Client
+.idea/httpRequests
+
+# Android studio 3.1+ serialized cache file
+.idea/caches/build_file_checksums.ser
+
+# ---> macOS
+# General
+.DS_Store
+.AppleDouble
+.LSOverride
+
+# Icon must end with two \r
+Icon
+
+# Thumbnails
+._*
+
+# Files that might appear in the root of a volume
+.DocumentRevisions-V100
+.fseventsd
+.Spotlight-V100
+.TemporaryItems
+.Trashes
+.VolumeIcon.icns
+.com.apple.timemachine.donotpresent
+
+# Directories potentially created on remote AFP share
+.AppleDB
+.AppleDesktop
+Network Trash Folder
+Temporary Items
+.apdisk
+
+# ---> Java
+# Compiled class file
+*.class
+
+# Log file
+*.log
+
+# BlueJ files
+*.ctxt
+
+# Mobile Tools for Java (J2ME)
+.mtj.tmp/
+
+# Package Files #
+*.jar
+*.war
+*.nar
+*.ear
+*.zip
+*.tar.gz
+*.rar
+
+# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
+hs_err_pid*
+replay_pid*
+
diff --git a/2A/Java/tp/JavaFX/tpjeude/.idea/.gitignore b/2A/Java/tp/JavaFX/tpjeude/.idea/.gitignore
new file mode 100644
index 0000000..26d3352
--- /dev/null
+++ b/2A/Java/tp/JavaFX/tpjeude/.idea/.gitignore
@@ -0,0 +1,3 @@
+# Default ignored files
+/shelf/
+/workspace.xml
diff --git a/2A/Java/tp/JavaFX/tpjeude/.idea/inspectionProfiles/Project_Default.xml b/2A/Java/tp/JavaFX/tpjeude/.idea/inspectionProfiles/Project_Default.xml
new file mode 100644
index 0000000..abefbef
--- /dev/null
+++ b/2A/Java/tp/JavaFX/tpjeude/.idea/inspectionProfiles/Project_Default.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/2A/Java/tp/JavaFX/tpjeude/.idea/misc.xml b/2A/Java/tp/JavaFX/tpjeude/.idea/misc.xml
new file mode 100644
index 0000000..4bb5ffc
--- /dev/null
+++ b/2A/Java/tp/JavaFX/tpjeude/.idea/misc.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/2A/Java/tp/JavaFX/tpjeude/.idea/modules.xml b/2A/Java/tp/JavaFX/tpjeude/.idea/modules.xml
new file mode 100644
index 0000000..4618ac3
--- /dev/null
+++ b/2A/Java/tp/JavaFX/tpjeude/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/2A/Java/tp/JavaFX/tpjeude/.idea/vcs.xml b/2A/Java/tp/JavaFX/tpjeude/.idea/vcs.xml
new file mode 100644
index 0000000..258b954
--- /dev/null
+++ b/2A/Java/tp/JavaFX/tpjeude/.idea/vcs.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/2A/Java/tp/JavaFX/tpjeude/README.md b/2A/Java/tp/JavaFX/tpjeude/README.md
new file mode 100644
index 0000000..d5792fa
--- /dev/null
+++ b/2A/Java/tp/JavaFX/tpjeude/README.md
@@ -0,0 +1,85 @@
+# La course de dé (version JavaFX)
+
+L'objectif de ce TP est d'ajouter une interface graphique au jeu de dé que vous avez codé en C++ en première année. Pour rappel :
+
+> La « course de dé » se joue en lançant un dé. Les joueurs jouent tour à tour (pour ce TP nous nous limiterons à deux joueurs). Lorsque c'est à son tour, le joueur lance un dé et, tant qu'il ne fait pas 1, accumule les points des lancers successifs. S'il fait 1, il perd les points qu'il avait accumulés pendant son tour de jeu et la main passe, c'est à l'autre joueur de jouer. Un joueur peut sciemment décider d'arrêter de lancer le dé et ainsi sécuriser le score de son tour de jeu. Le premier joueur qui atteint un score de victoire (par exemple 50) gagne.
+
+Afin de vous concenter sur l'interface graphique, nous vous fournissons la version Java du jeu que vous avez codé en C++. La conception de ce dernier est rappelé ci-dessous.
+
+```plantuml
+@startuml
+skinparam defaultFontName Tahoma
+skinparam classAttributeIconSize 0
+skinparam monochrome true
+skinparam shadowing false
+skinparam linetype ortho
+skinparam class {
+ BackgroundColor transparent
+}
+skinparam package {
+ BackgroundColor transparent
+}
+hide circle
+
+package launcher {
+
+class ConsoleGame {
+ +{static} main(args : String[])
+}
+
+}
+
+package model {
+
+class Dice {
+ -{static}NB_FACES_DEFAULT : int = 6 {frozen}
+ -nbFaces : int
+ -value : int
+
+ +Dice(nbFaces : int)
+ +Dice()
+ +getValue() : int
+ +roll() : int
+ +clear()
+}
+
+class Player {
+ -{static}num : int = 0
+ -name : string
+ -totalScore : int
+ -currentScore : int
+
+ +Player(name : string)
+ +Player()
+ +getName() : string
+ +getCurrentScore() : int
+ +setCurrentScore(score : int)
+ +getTotalScore() : int
+ +setTotalScore(score : int)
+}
+
+class Game {
+ +{static}LOSE_DICE_VALUE : int = 1 {frozen}
+ +{static}SCORE_TO_WIN : int = 50 {frozen}
+ -gameOver : boolean
+ -currentPlayerIndex : int
+
+ +Game()
+ +addPlayer(player : Player)
+ +getCurrentPlayer() : Player
+ +rollDice()
+ +getDiceValue() : int
+ +isGameOver() : boolean
+ +passToNextPlayer()
+ +restart()
+}
+
+Game --> "-dice" Dice
+Game --> "*\n-players" Player
+ConsoleGame ..> Game
+
+}
+
+@enduml
+```
+
diff --git a/2A/Java/tp/JavaFX/tpjeude/TPJeuDe.iml b/2A/Java/tp/JavaFX/tpjeude/TPJeuDe.iml
new file mode 100644
index 0000000..be37147
--- /dev/null
+++ b/2A/Java/tp/JavaFX/tpjeude/TPJeuDe.iml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/2A/Java/tp/JavaFX/tpjeude/res/dice/0.png b/2A/Java/tp/JavaFX/tpjeude/res/dice/0.png
new file mode 100644
index 0000000..e3fb511
Binary files /dev/null and b/2A/Java/tp/JavaFX/tpjeude/res/dice/0.png differ
diff --git a/2A/Java/tp/JavaFX/tpjeude/res/dice/1.png b/2A/Java/tp/JavaFX/tpjeude/res/dice/1.png
new file mode 100644
index 0000000..bf70486
Binary files /dev/null and b/2A/Java/tp/JavaFX/tpjeude/res/dice/1.png differ
diff --git a/2A/Java/tp/JavaFX/tpjeude/res/dice/2.png b/2A/Java/tp/JavaFX/tpjeude/res/dice/2.png
new file mode 100644
index 0000000..7886323
Binary files /dev/null and b/2A/Java/tp/JavaFX/tpjeude/res/dice/2.png differ
diff --git a/2A/Java/tp/JavaFX/tpjeude/res/dice/3.png b/2A/Java/tp/JavaFX/tpjeude/res/dice/3.png
new file mode 100644
index 0000000..8c480d6
Binary files /dev/null and b/2A/Java/tp/JavaFX/tpjeude/res/dice/3.png differ
diff --git a/2A/Java/tp/JavaFX/tpjeude/res/dice/4.png b/2A/Java/tp/JavaFX/tpjeude/res/dice/4.png
new file mode 100644
index 0000000..3465be2
Binary files /dev/null and b/2A/Java/tp/JavaFX/tpjeude/res/dice/4.png differ
diff --git a/2A/Java/tp/JavaFX/tpjeude/res/dice/5.png b/2A/Java/tp/JavaFX/tpjeude/res/dice/5.png
new file mode 100644
index 0000000..2bd6529
Binary files /dev/null and b/2A/Java/tp/JavaFX/tpjeude/res/dice/5.png differ
diff --git a/2A/Java/tp/JavaFX/tpjeude/res/dice/6.png b/2A/Java/tp/JavaFX/tpjeude/res/dice/6.png
new file mode 100644
index 0000000..d804cba
Binary files /dev/null and b/2A/Java/tp/JavaFX/tpjeude/res/dice/6.png differ
diff --git a/2A/Java/tp/JavaFX/tpjeude/res/fxml/Fenetre.fxml b/2A/Java/tp/JavaFX/tpjeude/res/fxml/Fenetre.fxml
new file mode 100644
index 0000000..8ce9be3
--- /dev/null
+++ b/2A/Java/tp/JavaFX/tpjeude/res/fxml/Fenetre.fxml
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/2A/Java/tp/JavaFX/tpjeude/src/launcher/ConsoleGame.java b/2A/Java/tp/JavaFX/tpjeude/src/launcher/ConsoleGame.java
new file mode 100644
index 0000000..3845385
--- /dev/null
+++ b/2A/Java/tp/JavaFX/tpjeude/src/launcher/ConsoleGame.java
@@ -0,0 +1,74 @@
+package launcher;
+
+import model.Game;
+import model.Player;
+
+import java.util.Scanner;
+
+public class ConsoleGame {
+ private static final String PROMPT = ", enter R to roll the dice or H to hold your score: ";
+ private static final String ALLOWED_KEYS = "[rRhH]";
+ private static final Scanner SCANNER = new Scanner(System.in);
+
+ private enum Choice {ROLL, HOLD, QUIT}
+
+ static public Choice readChoice(String playerName) {
+ String line = null;
+ System.out.print(playerName + PROMPT);
+ while (SCANNER.hasNext()) {
+ line = SCANNER.nextLine().trim();
+ if (line.length() == 1 && line.matches(ALLOWED_KEYS))
+ break;
+ System.out.print(playerName + PROMPT);
+ }
+
+ if (line == null)
+ return Choice.QUIT;
+ else {
+ return switch (line.charAt(0)) {
+ case 'r', 'R' -> Choice.ROLL;
+ case 'h', 'H' -> Choice.HOLD;
+ default -> throw new IllegalStateException("impossible branch");
+ };
+ }
+ }
+
+ public static void main(String[] args) {
+ Game teacherFight = new Game();
+ teacherFight.addPlayer(new Player("Laurent"));
+ teacherFight.addPlayer(new Player("Cédric"));
+
+ System.out.println("Laurent and Cédric are about to start a dice fight !");
+
+ while (!teacherFight.isGameOver()) {
+ Player currentPlayer = teacherFight.getCurrentPlayer();
+ System.out.println(currentPlayer);
+ Choice choice = readChoice(currentPlayer.getName());
+ switch (choice) {
+ case ROLL -> {
+ teacherFight.rollDice();
+ int diceValue = 0;
+ try {
+ diceValue = teacherFight.getDiceValue();
+ } catch (IllegalAccessException e) {
+ teacherFight.rollDice();
+ }
+ System.out.println(currentPlayer.getName() + " is rolling the dice… and get a " + diceValue);
+ if (diceValue == Game.LOSE_DICE_VALUE)
+ System.out.println(currentPlayer.getName() + " loses his turn.");
+ }
+ case HOLD -> {
+ teacherFight.passToNextPlayer();
+ System.out.println(currentPlayer.getName() + " decides to hold his score and has now " + currentPlayer.getTotalScore());
+ }
+ case QUIT -> {
+ System.out.println(currentPlayer.getName() + " quits.");
+ return;
+ }
+ }
+ }
+
+ Player winner = teacherFight.getCurrentPlayer();
+ System.out.println(winner.getName() + " wins the game !");
+ }
+}
diff --git a/2A/Java/tp/JavaFX/tpjeude/src/launcher/Launch.java b/2A/Java/tp/JavaFX/tpjeude/src/launcher/Launch.java
new file mode 100644
index 0000000..c49c037
--- /dev/null
+++ b/2A/Java/tp/JavaFX/tpjeude/src/launcher/Launch.java
@@ -0,0 +1,24 @@
+package launcher;
+
+import javafx.application.Application;
+import javafx.fxml.FXMLLoader;
+import javafx.scene.Parent;
+import javafx.scene.Scene;
+import javafx.stage.Stage;
+import view.Fenetre;
+
+import java.io.IOException;
+import java.util.Objects;
+
+public class Launch extends Application {
+ Parent root = FXMLLoader.load(getClass().getResource("/fxml/Fenetre.fxml"));
+
+ public Launch() throws IOException {
+ }
+
+ @Override
+ public void start(Stage primaryStage) throws Exception {
+ primaryStage.setScene(new Scene(root));
+ primaryStage.show();
+ }
+}
\ No newline at end of file
diff --git a/2A/Java/tp/JavaFX/tpjeude/src/model/Dice.java b/2A/Java/tp/JavaFX/tpjeude/src/model/Dice.java
new file mode 100644
index 0000000..4d93dcb
--- /dev/null
+++ b/2A/Java/tp/JavaFX/tpjeude/src/model/Dice.java
@@ -0,0 +1,33 @@
+package model;
+
+import java.util.Random;
+
+public class Dice {
+ private static final Random RANDOM = new Random();
+ private static final int NB_FACES_DEFAULT = 6;
+
+ private final int nbFaces;
+ private int value;
+
+ public Dice(int nbFaces) {
+ this.nbFaces = nbFaces;
+ }
+
+ public Dice() {
+ this(NB_FACES_DEFAULT);
+ }
+
+ public int getValue() throws IllegalAccessException {
+ if (value == 0)
+ throw new IllegalAccessException("The dice must be rolled first.");
+ return value;
+ }
+
+ public int roll() {
+ return value = RANDOM.nextInt(nbFaces) + 1;
+ }
+
+ public void clear() {
+ value = 0;
+ }
+}
diff --git a/2A/Java/tp/JavaFX/tpjeude/src/model/Game.java b/2A/Java/tp/JavaFX/tpjeude/src/model/Game.java
new file mode 100644
index 0000000..a7411cb
--- /dev/null
+++ b/2A/Java/tp/JavaFX/tpjeude/src/model/Game.java
@@ -0,0 +1,67 @@
+package model;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class Game {
+ public static final int LOSE_DICE_VALUE = 1;
+ public static final int SCORE_TO_WIN = 50;
+
+ private final Dice dice = new Dice();
+
+ private final List players = new ArrayList<>();
+ private int currentPlayerIndex = 0;
+
+ private boolean gameOver;
+
+ public boolean isGameOver() {
+ return gameOver;
+ }
+
+ public void addPlayer(Player player) {
+ players.add(player);
+ }
+
+ public Player getCurrentPlayer() {
+ return players.get(currentPlayerIndex);
+ }
+
+ public void rollDice() {
+ int rollValue = dice.roll();
+ Player currentPlayer = players.get(currentPlayerIndex);
+ if (rollValue != LOSE_DICE_VALUE) {
+ currentPlayer.setCurrentScore(currentPlayer.getCurrentScore() + rollValue);
+ } else {
+ currentPlayer.setCurrentScore(0);
+ passToNextPlayer();
+ }
+ }
+
+ public void passToNextPlayer() {
+ if (!isGameOver()) {
+ Player currentPlayer = players.get(currentPlayerIndex);
+ int newTotalScore = currentPlayer.getTotalScore() + currentPlayer.getCurrentScore();
+ currentPlayer.setTotalScore(newTotalScore);
+ currentPlayer.setCurrentScore(0);
+ if (newTotalScore >= SCORE_TO_WIN) {
+ gameOver = true;
+ } else {
+ currentPlayerIndex = ++currentPlayerIndex % players.size();
+ }
+ }
+ }
+
+ public void restart() {
+ dice.clear();
+ players.forEach(player -> {
+ player.setCurrentScore(0);
+ player.setTotalScore(0);
+ });
+ gameOver = false;
+ passToNextPlayer();
+ }
+
+ public int getDiceValue() throws IllegalAccessException {
+ return dice.getValue();
+ }
+}
diff --git a/2A/Java/tp/JavaFX/tpjeude/src/model/Player.java b/2A/Java/tp/JavaFX/tpjeude/src/model/Player.java
new file mode 100644
index 0000000..715bb9b
--- /dev/null
+++ b/2A/Java/tp/JavaFX/tpjeude/src/model/Player.java
@@ -0,0 +1,47 @@
+package model;
+
+public class Player {
+ private static final String BASE_PLAYER_NAME_DEFAULT = "Player ";
+ private static int num = 0;
+
+ private String name;
+ private int totalScore;
+ private int currentScore;
+
+ public Player(String name) {
+ setName(name);
+ }
+
+ public Player() {
+ this(BASE_PLAYER_NAME_DEFAULT + ++num);
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public int getTotalScore() {
+ return totalScore;
+ }
+
+ public void setTotalScore(int score) {
+ totalScore = score;
+ }
+
+ public int getCurrentScore() {
+ return currentScore;
+ }
+
+ public void setCurrentScore(int score) {
+ currentScore = score;
+ }
+
+ @Override
+ public String toString() {
+ return name + " (" + totalScore + ") has currently " + currentScore;
+ }
+}
diff --git a/2A/Java/tp/JavaFX/tpjeude/src/view/Fenetre.java b/2A/Java/tp/JavaFX/tpjeude/src/view/Fenetre.java
new file mode 100644
index 0000000..7fc782b
--- /dev/null
+++ b/2A/Java/tp/JavaFX/tpjeude/src/view/Fenetre.java
@@ -0,0 +1,77 @@
+package view;
+
+import javafx.fxml.FXML;
+import javafx.scene.control.Button;
+import javafx.scene.text.Text;
+import launcher.ConsoleGame;
+import model.Game;
+import model.Player;
+
+import java.util.Scanner;
+
+public class Fenetre {
+ @FXML
+ private Button buttonHold;
+ @FXML
+ private Button buttonRoll;
+ @FXML
+ private Text topText;
+ @FXML
+ private Text bottomText;
+ @FXML
+ private Text centerText;
+
+
+// private static final String PROMPT = ", enter R to roll the dice or H to hold your score: ";
+// private static final String ALLOWED_KEYS = "[rRhH]";
+//
+// private enum Choice {ROLL, HOLD, QUIT}
+////
+// public Choice readChoice(String playerName) {
+// if(this.buttonHold.getOnMouseClicked()) {
+// return Choice.HOLD;
+// } else if(this.buttonRoll.getOnMouseClicked()) {
+// return Choice.ROLL;
+// }
+// return null;
+// }
+
+// public static void main(String[] args) {
+// Game teacherFight = new Game();
+// teacherFight.addPlayer(new Player("Laurent"));
+// teacherFight.addPlayer(new Player("Cédric"));
+//
+// System.out.println("Laurent and Cédric are about to start a dice fight !");
+//
+// while (!teacherFight.isGameOver()) {
+// Player currentPlayer = teacherFight.getCurrentPlayer();
+// System.out.println(currentPlayer);
+// ConsoleGame.Choice choice = readChoice(currentPlayer.getName());
+// switch (choice) {
+// case ROLL -> {
+// teacherFight.rollDice();
+// int diceValue = 0;
+// try {
+// diceValue = teacherFight.getDiceValue();
+// } catch (IllegalAccessException e) {
+// teacherFight.rollDice();
+// }
+// System.out.println(currentPlayer.getName() + " is rolling the dice… and get a " + diceValue);
+// if (diceValue == Game.LOSE_DICE_VALUE)
+// System.out.println(currentPlayer.getName() + " loses his turn.");
+// }
+// case HOLD -> {
+// teacherFight.passToNextPlayer();
+// System.out.println(currentPlayer.getName() + " decides to hold his score and has now " + currentPlayer.getTotalScore());
+// }
+// case QUIT -> {
+// System.out.println(currentPlayer.getName() + " quits.");
+// return;
+// }
+// }
+// }
+//
+// Player winner = teacherFight.getCurrentPlayer();
+// System.out.println(winner.getName() + " wins the game !");
+// }
+}