Ajout joueurs

This commit is contained in:
Paul Gross
2020-05-12 11:06:34 +02:00
parent 7a689e6007
commit 60cfeddaf1
7 changed files with 86 additions and 102 deletions

View File

@@ -362,9 +362,8 @@ public class PlateauController implements Initializable {
avzj.changeLabel(valeur);
JoueurIHM jihm = getJoueurIHM(j);
jihm.setZoneJoueur(root);
Timeline timeline = new Timeline(new KeyFrame(
Duration.millis(2500),
Duration.millis(1000),
ae -> {
jihm.resetZoneJoueur();
GestionnaireJeu.notifyPlateau();
@@ -389,6 +388,8 @@ public class PlateauController implements Initializable {
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
Pane root = (Pane)fxmlLoader.load();
this.cj = fxmlLoader.getController();
this.cj.setListJoueursIHM(this.joueursIHM);
this.cj.initButtons();
JoueurIHM jihm = getJoueurIHM(j);
jihm.setZoneJoueur(root);
}
@@ -410,11 +411,10 @@ public class PlateauController implements Initializable {
}
public Joueur getChoixJoueur(Joueur joueur) {
JoueurIHM jihm = getJoueurIHM(joueur);
int result = this.cj.getJoueurSelected();
JoueurIHM result = this.cj.getJoueurSelected();
this.cj = null;
jihm.getZoneJoueur().getChildren().setAll();
return listJoueur.get(result);
return result.getJoueur();
}
public void deplacer(Joueur currentJoueur) {