Avoid the java error
This commit is contained in:
		| @ -15,14 +15,15 @@ public class MenuAccueil extends StackPane { | ||||
|     public MenuAccueil(){ | ||||
|         super(); | ||||
|         //create all the objet that I need | ||||
|         ChoiceBox SlctDifficulty = new ChoiceBox(); | ||||
|         ChoiceBox<String> SlctDifficulty = new ChoiceBox<>(); | ||||
|         SlctDifficulty.getItems().addAll("Easy", "Medium", "Difficult"); | ||||
|  | ||||
|         Label RdmLvl = new Label("Random Level : "); | ||||
|         Button SelectLevel= new Button("Select Level"); | ||||
|         Label Title = new Label("Welcome to Road to Master"); | ||||
|         SlctDifficulty.setOnAction(event -> { | ||||
|             String choosediff = SlctDifficulty.getSelectionModel().getSelectedItem().toString(); | ||||
|             String choosediff = SlctDifficulty.getSelectionModel().getSelectedItem(); | ||||
|             System.out.println(choosediff); | ||||
|            switch(choosediff){ | ||||
|                 case "Easy": | ||||
|                     SlctDifficulty.setOnAction(event1 -> MapGenerator.generate(MapGenerator.Difficulty.Easy)); | ||||
|  | ||||
		Reference in New Issue
	
	Block a user