Ajout LieuZJ

This commit is contained in:
Paul Gross
2020-05-11 13:55:11 +02:00
parent df54f21dfd
commit b595503b7b
9 changed files with 152 additions and 47 deletions

View File

@@ -287,7 +287,6 @@ public class PlateauController implements Initializable {
for(JoueurIHM joueurIHM : joueursIHM) {
if(joueurIHM.getJoueur().equals(j)) return joueurIHM;
}
return null;
}
@@ -325,7 +324,6 @@ public class PlateauController implements Initializable {
getPaneJoueur(i).getChildren().setAll();
}
}
}
public void rollDice(Joueur joueur, int typeDice, int[] rolls) {
@@ -342,6 +340,19 @@ public class PlateauController implements Initializable {
JoueurIHM jihm = getJoueurIHM(j);
jihm.setZoneJoueur(root);
}
public void afficherLieu(Joueur j) throws IOException {
final URL fxmlURL = getClass().getResource("/ihm/ressources/LieuZJ.fxml");
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", Locale.FRANCE);
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
Pane root = (Pane)fxmlLoader.load();
LieuZJ lzj = fxmlLoader.getController();
lzj.setImageView(this.getImageCarte(j.getCarteLieu()));
JoueurIHM jihm = getJoueurIHM(j);
jihm.setZoneJoueur(root);
}
public boolean getChoix(Joueur joueur) {
JoueurIHM jihm = getJoueurIHM(joueur);
@@ -384,4 +395,7 @@ public class PlateauController implements Initializable {
BufferedImage bi = this.mapRessourcesCartes.get(carte);
return RessourceLoader.toJavaFX(bi);
}
}