PlateauTest2 déplacement des pions

This commit is contained in:
Paul Gross
2020-05-04 11:14:52 +02:00
parent afaef5411b
commit 80a0c89d49
7 changed files with 119 additions and 21 deletions

View File

@@ -34,7 +34,7 @@ public class PlateauController implements Initializable {
@FXML private AnchorPane rootPane;
@FXML private GridPane gridPaneVie;
//@FXML static public GridPane gridPaneLieux;
@FXML public GridPane gridPaneLieux;
private ChoisirBoolean cb;
@@ -62,7 +62,7 @@ public class PlateauController implements Initializable {
for(int i : map.keySet()) {
System.out.println(i);
joueursIHM.add(new JoueurIHM(i,map.get(i),getPaneJoueur(i),new Color(Math.random(), Math.random(), Math.random(),1),gridPaneVie));
joueursIHM.add(new JoueurIHM(i,map.get(i),getPaneJoueur(i),new Color(Math.random(), Math.random(), Math.random(),1),gridPaneVie, gridPaneLieux));
}
for(int i = 0; i<joueursIHM.size(); i++) {
@@ -281,4 +281,16 @@ public class PlateauController implements Initializable {
jihm.getZoneJoueur().getChildren().setAll();
return result;
}
public void deplacer(Joueur currentJoueur) {
JoueurIHM jIHM = getJoueurIHM(currentJoueur);
jIHM.replacerPionLieu();
}
public void updateVieJoueur(Joueur joueur, int damage) {
/*JoueurIHM jIHM = getJoueurIHM(joueur);
jIHM.deplacerPionVie(damage);*/
}
}