Changes by tonitch
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing

This commit is contained in:
Mat 2023-05-18 17:31:45 +02:00
parent bde347d84c
commit 9ff205b4de

View File

@ -28,33 +28,25 @@ public class MenuAccueil extends StackPane {
System.out.println(choosediff);
switch (choosediff) {
case "Easy":
SlctDifficulty.setOnAction(event1 -> {
try {
Controller.switchRoot(new GameUI(MapGenerator.generate(MapGenerator.Difficulty.Easy)));
} catch (FileNotFoundException e) {
throw new RuntimeException(e);
}
});
try {
Controller.switchRoot(new GameUI(MapGenerator.generate(MapGenerator.Difficulty.Easy)));
} catch (FileNotFoundException e) {
throw new RuntimeException(e);
}
break;
case "Medium":
SlctDifficulty.setOnAction(event1 -> {
try {
Controller.switchRoot(new GameUI(MapGenerator.generate(MapGenerator.Difficulty.Medium)));
} catch (FileNotFoundException e) {
throw new RuntimeException(e);
}
});
break;
case "Difficult":
SlctDifficulty.setOnAction(event1 -> {
try {
Controller.switchRoot(new GameUI(MapGenerator.generate(MapGenerator.Difficulty.Difficult)));
} catch (FileNotFoundException e) {
throw new RuntimeException(e);
}
});
break;
}
});