diff --git a/src/ihm/Couple.java b/src/ihm/Couple.java index fb35684..2b005a4 100644 --- a/src/ihm/Couple.java +++ b/src/ihm/Couple.java @@ -3,10 +3,17 @@ package ihm; public class Couple { private String nom; private boolean ia; // true -> joueur virtuel + private int lvlIa; - public Couple (String nom, boolean ia) { + public Couple (String nom) { this.nom = nom; - this.ia = ia; + this.ia = false; + } + + public Couple (String nom, int niveau) { + this.nom = nom; + this.lvlIa = niveau; + this.ia = true; } public String getNom() { @@ -17,6 +24,7 @@ public class Couple { this.nom = nom; } + public boolean isIa() { return ia; } @@ -25,4 +33,14 @@ public class Couple { this.ia = ia; } + public int getLvlIa() { + return lvlIa; + } + + public void setLvlIa(int lvlIa) { + this.lvlIa = lvlIa; + } + + + } diff --git a/src/ihm/controller/PlayersController.java b/src/ihm/controller/PlayersController.java index cd0385e..e4679dc 100644 --- a/src/ihm/controller/PlayersController.java +++ b/src/ihm/controller/PlayersController.java @@ -19,7 +19,9 @@ import javafx.scene.Node; import javafx.scene.Scene; import javafx.scene.control.Button; import javafx.scene.control.CheckBox; +import javafx.scene.control.RadioButton; import javafx.scene.control.TextField; +import javafx.scene.control.ToggleGroup; import javafx.scene.input.MouseEvent; import javafx.scene.layout.AnchorPane; import javafx.scene.layout.HBox; @@ -43,18 +45,48 @@ public class PlayersController implements Initializable{ @FXML private HBox hb7; @FXML private HBox hb8; + + //pour les radios boutons + @FXML private HBox hbr1; + @FXML private HBox hbr2; + @FXML private HBox hbr3; + @FXML private HBox hbr4; + @FXML private HBox hbr5; + @FXML private HBox hbr6; + @FXML private HBox hbr7; + @FXML private HBox hbr8; + + + @FXML private ToggleGroup tg1; + @FXML private ToggleGroup tg2; + @FXML private ToggleGroup tg3; + @FXML private ToggleGroup tg4; + @FXML private ToggleGroup tg5; + @FXML private ToggleGroup tg6; + @FXML private ToggleGroup tg7; + @FXML private ToggleGroup tg8; + + private List ligne = new ArrayList(); private List