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