Changes by tonitch
This commit is contained in:
parent
bde347d84c
commit
9ff205b4de
@ -28,33 +28,25 @@ public class MenuAccueil extends StackPane {
|
|||||||
System.out.println(choosediff);
|
System.out.println(choosediff);
|
||||||
switch (choosediff) {
|
switch (choosediff) {
|
||||||
case "Easy":
|
case "Easy":
|
||||||
SlctDifficulty.setOnAction(event1 -> {
|
|
||||||
try {
|
try {
|
||||||
Controller.switchRoot(new GameUI(MapGenerator.generate(MapGenerator.Difficulty.Easy)));
|
Controller.switchRoot(new GameUI(MapGenerator.generate(MapGenerator.Difficulty.Easy)));
|
||||||
} catch (FileNotFoundException e) {
|
} catch (FileNotFoundException e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
});
|
|
||||||
break;
|
break;
|
||||||
case "Medium":
|
case "Medium":
|
||||||
SlctDifficulty.setOnAction(event1 -> {
|
|
||||||
try {
|
try {
|
||||||
Controller.switchRoot(new GameUI(MapGenerator.generate(MapGenerator.Difficulty.Medium)));
|
Controller.switchRoot(new GameUI(MapGenerator.generate(MapGenerator.Difficulty.Medium)));
|
||||||
} catch (FileNotFoundException e) {
|
} catch (FileNotFoundException e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
});
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case "Difficult":
|
case "Difficult":
|
||||||
SlctDifficulty.setOnAction(event1 -> {
|
|
||||||
try {
|
try {
|
||||||
Controller.switchRoot(new GameUI(MapGenerator.generate(MapGenerator.Difficulty.Difficult)));
|
Controller.switchRoot(new GameUI(MapGenerator.generate(MapGenerator.Difficulty.Difficult)));
|
||||||
} catch (FileNotFoundException e) {
|
} catch (FileNotFoundException e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
});
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user