From 34e3690ba97eb198cd878b01a257bf0a21c76708 Mon Sep 17 00:00:00 2001 From: Chiara Date: Wed, 6 May 2020 15:24:39 +0200 Subject: [PATCH] controller piocher et lancer des --- src/ihm/controller/PiocherCarte.java | 40 +++++++++ .../Jouer_tour(3b)choix_attaque.fxml | 85 +++++++++++++++++++ 2 files changed, 125 insertions(+) create mode 100644 src/ihm/controller/PiocherCarte.java create mode 100644 src/ihm/ressources/Jouer_tour(3b)choix_attaque.fxml diff --git a/src/ihm/controller/PiocherCarte.java b/src/ihm/controller/PiocherCarte.java new file mode 100644 index 0000000..e67c1ff --- /dev/null +++ b/src/ihm/controller/PiocherCarte.java @@ -0,0 +1,40 @@ +package ihm.controller; + +import java.net.URL; +import java.util.ResourceBundle; + +import javafx.fxml.FXML; +import javafx.fxml.Initializable; +import javafx.scene.control.Button; + +import main.Type; +import main.TypeLumiere; +import main.TypeTenebre; +import main.TypeVision; + +public class PiocherCarte implements Initializable{ + @FXML private Button lumiere; + @FXML private Button vision; + @FXML private Button tenebre; + + private Type carte; + + @Override + public void initialize(URL arg0, ResourceBundle arg1) { + lumiere.setOnAction(e ->{ + carte = new TypeLumiere(); + }); + + vision.setOnAction(e -> { + carte = new TypeVision(); + }); + + tenebre.setOnAction(e -> { + carte = new TypeTenebre(); + }); + } + + public Type getCarte() { + return carte; + } +} diff --git a/src/ihm/ressources/Jouer_tour(3b)choix_attaque.fxml b/src/ihm/ressources/Jouer_tour(3b)choix_attaque.fxml new file mode 100644 index 0000000..05f086a --- /dev/null +++ b/src/ihm/ressources/Jouer_tour(3b)choix_attaque.fxml @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +