Skip to content
Snippets Groups Projects
Commit d4362f99 authored by Sigurd Spook's avatar Sigurd Spook
Browse files

Updated javadoc CommandLineInterface.java

parent a4aaa397
No related branches found
No related tags found
1 merge request!27Improved several areas of the GUI
Pipeline #288481 passed
...@@ -26,12 +26,13 @@ public class NavigationController implements FileControllerObserver { ...@@ -26,12 +26,13 @@ public class NavigationController implements FileControllerObserver {
private static NavigationController instance = null; private static NavigationController instance = null;
private final HomePage view; private final HomePage view;
private final NavigationModel model; private final NavigationModel model;
@SuppressWarnings("unused")
private ChaosGameController gameController; private ChaosGameController gameController;
private final FileModel fileModel = FileModel.getInstance(); private final FileModel fileModel = FileModel.getInstance();
/** /**
* Constructor for NavigationController. A singleton class. * Constructor for NavigationController. A singleton class.
* Creates a new NavigationController with a reference to the HomePage and NavigationModel. * Create a new NavigationController with a reference to the HomePage and NavigationModel.
* *
* @param view The HomePage to bind the navigation to. * @param view The HomePage to bind the navigation to.
* @param model The NavigationModel to bind the navigation to. * @param model The NavigationModel to bind the navigation to.
...@@ -129,8 +130,7 @@ public class NavigationController implements FileControllerObserver { ...@@ -129,8 +130,7 @@ public class NavigationController implements FileControllerObserver {
*/ */
public void selectGameFiles() { public void selectGameFiles() {
//Gets the buttons for each file made by the FileController //Gets the buttons for each file made by the FileController
view.getButtonBoxFiles().getFileButtons().forEach(button -> { view.getButtonBoxFiles().getFileButtons().forEach(button -> button.setOnAction(e -> {
button.setOnAction(e -> {
try { try {
ChaosGameDescription game = fileModel.getFile(button.getText()); ChaosGameDescription game = fileModel.getFile(button.getText());
if (game.getGameType().equals(GameType.JULIA)) { if (game.getGameType().equals(GameType.JULIA)) {
...@@ -145,8 +145,7 @@ public class NavigationController implements FileControllerObserver { ...@@ -145,8 +145,7 @@ public class NavigationController implements FileControllerObserver {
alertError.showAlertError(); alertError.showAlertError();
e.consume(); e.consume();
} }
}); }));
});
} }
/** /**
......
...@@ -143,7 +143,7 @@ public class CommandLineInterface { ...@@ -143,7 +143,7 @@ public class CommandLineInterface {
System.out.println("No file chosen. Returning to main menu."); System.out.println("No file chosen. Returning to main menu.");
} else { } else {
description = readChaosGameDescriptionFromFile(file); description = readChaosGameDescriptionFromFile(file);
chaosGame = new ChaosGame(description, 100, 30); chaosGame = new ChaosGame(description, 50, 50);
System.out.println("Chaos Game Description loaded successfully!"); System.out.println("Chaos Game Description loaded successfully!");
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment