Factoriser PlateauController

This commit is contained in:
Paul Gross
2020-04-30 11:41:15 +02:00
parent 8042514def
commit b6932c530e
16 changed files with 69 additions and 87 deletions

View File

@@ -115,14 +115,18 @@ public class PlayersController implements Initializable{
// Creer une configuration
//View.applyConfiguration(new Configuration(joueurs, nbJoueursV, nbJoueursH));
GestionnaireJeu gj = GestionnaireJeu.getGestionnaireJeu();
gj.setConfiguration(new Configuration(this.joueurs));
final URL fxmlURL = getClass().getResource("../ressources/Plateau.fxml");
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", Locale.FRENCH);
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
Parent root = fxmlLoader.load();
PlateauController pc = fxmlLoader.getController();
GestionnaireJeu.setPlateauController(pc);
GestionnaireJeu.setConfiguration(new Configuration(this.joueurs));
Map<Integer, Joueur> map = GestionnaireJeu.getJoueursMap(new Configuration(this.joueurs));
gj.setPlateauController(pc);
Map<Integer, Joueur> map = gj.getMapJoueurs();
pc.showInformation(map);