From 8952512b3e51bde274c81d99db917c4471f1a013 Mon Sep 17 00:00:00 2001 From: Paul Gross Date: Tue, 5 May 2020 13:53:54 +0200 Subject: [PATCH] TestAddingCard --- src/database/TestAddingCard.java | 3 --- src/ihm/controller/ChoisirBoolean.java | 7 +------ src/ihm/controller/PiocherVisionController.java | 10 +++++----- 3 files changed, 6 insertions(+), 14 deletions(-) diff --git a/src/database/TestAddingCard.java b/src/database/TestAddingCard.java index 8be09b9..44c72ec 100644 --- a/src/database/TestAddingCard.java +++ b/src/database/TestAddingCard.java @@ -30,7 +30,6 @@ public class TestAddingCard { public static void main(String[] args) { CartePiochable instance = new CartePiochable(new EffetSelf(new ActionAltererStatistiquesJoueur(Joueur.PLAYER_HP, 2, true)), new Condition()); - try { insertCartePiochable(instance); @@ -81,8 +80,6 @@ public class TestAddingCard { object = rs.getBytes(1); } - - ByteArrayInputStream in = new ByteArrayInputStream(object); ObjectInputStream is = new ObjectInputStream(in); return (CartePiochable) is.readObject(); diff --git a/src/ihm/controller/ChoisirBoolean.java b/src/ihm/controller/ChoisirBoolean.java index ece7c98..da7dd09 100644 --- a/src/ihm/controller/ChoisirBoolean.java +++ b/src/ihm/controller/ChoisirBoolean.java @@ -10,7 +10,6 @@ import main.GestionnaireJeu; public class ChoisirBoolean implements Initializable { - @FXML private Button ouiButton; @FXML private Button nonButton; @@ -22,19 +21,15 @@ public class ChoisirBoolean implements Initializable { this.result = true; GestionnaireJeu.notifyPlateau(); - }); nonButton.setOnAction(x -> { - this.result = false; GestionnaireJeu.notifyPlateau(); - }); - + }); } public boolean getResult() { return this.result; } - } diff --git a/src/ihm/controller/PiocherVisionController.java b/src/ihm/controller/PiocherVisionController.java index 0dfd96d..ab90dc9 100644 --- a/src/ihm/controller/PiocherVisionController.java +++ b/src/ihm/controller/PiocherVisionController.java @@ -21,11 +21,11 @@ public class PiocherVisionController implements Initializable{ @FXML public void voirCarte(MouseEvent mouseEvent) throws IOException{ - final URL fxmlURL = getClass().getResource("/ihm/ressources/jouer_Son_Tour_donner_vision.fxml"); - final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", Locale.FRANCE); - final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle); - Pane pane = fxmlLoader.load(); - + final URL fxmlURL = getClass().getResource("/ihm/ressources/jouer_Son_Tour_donner_vision.fxml"); + final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", Locale.FRANCE); + final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle); + Pane pane = fxmlLoader.load(); + rootPane.getChildren().setAll(pane); }