ScreenLevelFinish #64

Merged
Mat_02 merged 11 commits from ScreenLevelFinish into master 2023-05-18 19:03:56 +02:00
Showing only changes of commit 9ff205b4de - Show all commits

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);
Mat_02 marked this conversation as resolved
Review

Le MapGenerator.generate() retourne une Map
Cette Map doit ensuite être chargée par GameUI(Map)

Il faudrait du coup

SlctDifficulty.setOnAction(event1 -> Controller.switchRoot(new GameUI(MapGenerator.generate(MapGenerator.Difficulty.Difficult))); 
Le `MapGenerator.generate()` retourne une `Map` Cette Map doit ensuite être chargée par `GameUI(Map)` Il faudrait du coup ```java SlctDifficulty.setOnAction(event1 -> Controller.switchRoot(new GameUI(MapGenerator.generate(MapGenerator.Difficulty.Difficult))); ```
}
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;
}
});