diff --git a/gui/src/Case.java b/gui/src/Case.java index 6388147470a1086cf46606f751faf1d8502e1865..150d2419288057cf06f4ee34a9e039d5427df6cd 100644 --- a/gui/src/Case.java +++ b/gui/src/Case.java @@ -1,21 +1,26 @@ +import javafx.scene.shape.Polygon; + public class Case { private int rang; //N� de la case (bottom right = 0, top left = 59) private int nbFish;//Nb de poissons sur la case (0 si vide) private boolean bluePenguin; //true s'il y a un pinguin bleu sur la case private boolean redPenguin; //true s'il y a un pinguin rouge sur la case + private Polygon caseFX; - public Case(int rang, int nbFish, boolean bluePenguin, boolean redPenguin) { + public Case(int rang, int nbFish, boolean bluePenguin, boolean redPenguin, Polygon caseFX) { super(); this.rang = rang; this.nbFish = nbFish; this.bluePenguin = bluePenguin; this.redPenguin = redPenguin; + this.caseFX = caseFX; } - public Case(int rang) { //Constructeur de case vide + public Case(int rang, Polygon caseFX) { //Constructeur de case vide super(); this.rang = rang; + this.caseFX = caseFX; nbFish=0; bluePenguin=false; redPenguin=false; diff --git a/gui/src/Controller.java b/gui/src/Controller.java index 10651a9ca77a54bfd3cbf70d3e492836b4f8e8d8..b890fc57930334579e67effefbe8294e56b213d6 100644 --- a/gui/src/Controller.java +++ b/gui/src/Controller.java @@ -15,137 +15,20 @@ public class Controller implements Initializable { private Process gameProcess; @FXML - private Polygon case0,case1; - //@FXML - //private Polygon case1; - @FXML - private Polygon case2; - @FXML - private Polygon case3; - @FXML - private Polygon case4; - @FXML - private Polygon case5; - @FXML - private Polygon case6; - @FXML - private Polygon case7; - @FXML - private Polygon case8; - @FXML - private Polygon case9; - @FXML - private Polygon case10; - @FXML - private Polygon case11; - @FXML - private Polygon case12; - @FXML - private Polygon case13; - @FXML - private Polygon case14; - @FXML - private Polygon case15; - @FXML - private Polygon case16; - @FXML - private Polygon case17; - @FXML - private Polygon case18; - @FXML - private Polygon case19; - @FXML - private Polygon case20; - @FXML - private Polygon case21; - @FXML - private Polygon case22; - @FXML - private Polygon case23; - @FXML - private Polygon case24; - @FXML - private Polygon case25; - @FXML - private Polygon case26; - @FXML - private Polygon case27; - @FXML - private Polygon case28; - @FXML - private Polygon case29; - @FXML - private Polygon case30; - @FXML - private Polygon case31; - @FXML - private Polygon case32; - @FXML - private Polygon case33; - @FXML - private Polygon case34; - @FXML - private Polygon case35; - @FXML - private Polygon case36; - @FXML - private Polygon case37; - @FXML - private Polygon case38; - @FXML - private Polygon case39; - @FXML - private Polygon case40; - @FXML - private Polygon case41; - @FXML - private Polygon case42; - @FXML - private Polygon case43; - @FXML - private Polygon case44; - @FXML - private Polygon case45; - @FXML - private Polygon case46; - @FXML - private Polygon case47; - @FXML - private Polygon case48; - @FXML - private Polygon case49; - @FXML - private Polygon case50; - @FXML - private Polygon case51; - @FXML - private Polygon case52; - @FXML - private Polygon case53; - @FXML - private Polygon case54; - @FXML - private Polygon case55; - @FXML - private Polygon case56; - @FXML - private Polygon case57; - @FXML - private Polygon case58; - @FXML - private Polygon case59; + private Polygon case0, case1, case2, case3, case4, case5, case6, case7, case8, case9, case10, case11, case12, case13, case14, case15, case16, case17, case18, case19, case20, case21, case22, case23, case24, case25, case26, case27, case28, case29, case30, case31, case32, case33, case34, case35, case36, case37, case38, case39, case40, case41, case42, case43, case44, case45, case46, case47, case48, case49, case50, case51, case52, case53, case54, case55, case56, case57, case58, case59; + @FXML private BorderPane panneauPrincipal; @Override public void initialize(URL location, ResourceBundle resources) { - try { + /*try { this.gameProcess = new ProcessBuilder("../bin/theturk").start(); } catch (IOException e) { // TODO Error message and exit e.printStackTrace(); - } + }*/