From 5870bca27115152330aa2af0836ecb9b3bfcade5 Mon Sep 17 00:00:00 2001 From: Sami Zouari <sami.zouari@univ-lorraine.fr> Date: Thu, 27 Jan 2022 16:02:13 +0100 Subject: [PATCH] question 8 finie meilleure version --- .../java/com/example/testig/Ecouteur.java | 37 +++++++++---------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/src/main/java/com/example/testig/Ecouteur.java b/src/main/java/com/example/testig/Ecouteur.java index 395811b..1448831 100644 --- a/src/main/java/com/example/testig/Ecouteur.java +++ b/src/main/java/com/example/testig/Ecouteur.java @@ -74,33 +74,32 @@ public class Ecouteur implements EventHandler<ActionEvent> { ImageView de6_3 = new ImageView(de_face6); switch (n) { - case 1 -> label1.setGraphic(de1_1); - case 2 -> label1.setGraphic(de2_1); - case 3 -> label1.setGraphic(de3_1); - case 4 -> label1.setGraphic(de4_1); - case 5 -> label1.setGraphic(de5_1); - case 6 -> label1.setGraphic(de6_1); + case 0 -> label1.setGraphic(de1_1); + case 1 -> label1.setGraphic(de2_1); + case 2 -> label1.setGraphic(de3_1); + case 3 -> label1.setGraphic(de4_1); + case 4 -> label1.setGraphic(de5_1); + case 5 -> label1.setGraphic(de6_1); } switch (x) { - case 1 -> label2.setGraphic(de1_2); - case 2 -> label2.setGraphic(de2_2); - case 3 -> label2.setGraphic(de3_2); - case 4 -> label2.setGraphic(de4_2); - case 5 -> label2.setGraphic(de5_2); - case 6 -> label2.setGraphic(de6_2); + case 0 -> label2.setGraphic(de1_2); + case 1 -> label2.setGraphic(de2_2); + case 2 -> label2.setGraphic(de3_2); + case 3 -> label2.setGraphic(de4_2); + case 4 -> label2.setGraphic(de5_2); + case 5 -> label2.setGraphic(de6_2); } switch (y) { - case 1 -> label3.setGraphic(de1_3); - case 2 -> label3.setGraphic(de2_3); - case 3 -> label3.setGraphic(de3_3); - case 4 -> label3.setGraphic(de4_3); - case 5 -> label3.setGraphic(de5_3); - case 6 -> label3.setGraphic(de6_3); + case 0 -> label3.setGraphic(de1_3); + case 1 -> label3.setGraphic(de2_3); + case 2 -> label3.setGraphic(de3_3); + case 3 -> label3.setGraphic(de4_3); + case 4 -> label3.setGraphic(de5_3); + case 5 -> label3.setGraphic(de6_3); } - if(n == 4 && x == 2 && y == 1){ nb421 += 1; -- GitLab