Check if the baord is completed and return to main menu
This commit is contained in:
@ -2,6 +2,7 @@ package school_project;
|
||||
|
||||
import javafx.scene.Group;
|
||||
import javafx.scene.input.MouseButton;
|
||||
import school_project.Menu.MenuAcceuil;
|
||||
import school_project.Utils.MatrixShape;
|
||||
|
||||
import java.io.FileNotFoundException;
|
||||
@ -70,6 +71,9 @@ public class GameUI extends Group{
|
||||
_piece.setLayoutX(grid.getLayoutX() + p.getPosition().y * (SEGMENT_SIZE+SPACE_SIZE));
|
||||
_piece.setLayoutY(grid.getLayoutY() + p.getPosition().x * (SEGMENT_SIZE+SPACE_SIZE));
|
||||
}
|
||||
if(level.gameDone()){
|
||||
Controller.switchRoot(new MenuAcceuil());
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user