@FXML
    public void action(ActionEvent event) {
        if(event.getSource().equals(buttonOk)) {
            Core.getIntance().close();
            Model.getIntance().newGame(EGameMode.offline, ((EGame) choiceBoxGame.getValue()).getGameSize(), ((EGame) choiceBoxGame.getValue()).getWinLength());
        }

        if(event.getSource().equals(buttonCancel))
            Core.getIntance().close();
    }