Add MazeModelInterface and Maze exceptions
* Add an interface for MazeModel * Add MazeReadingException and MazeSavingException to handle errors when reading/saving a maze from/to a file (see #4) * Useless methods removal (shallowShortest) * Add javadoc
This commit is contained in:
1 parent
e76db727c7
commit
dc8de8c707
11 files changed
+300
-79
No files matched your search
@@ -13,8 +13,6 @@ public final class FileBox {
|
||||
|
||||
int returnVal = fileChooser.showOpenDialog(mazeApp);
|
||||
if(returnVal == JFileChooser.APPROVE_OPTION) {
|
||||
System.out.println("You chose to open this file: " +
|
||||
fileChooser.getSelectedFile().getName());
|
||||
String filename = fileChooser.getSelectedFile().getPath();
|
||||
return filename;
|
||||
}
|
||||
@@ -26,8 +24,6 @@ public final class FileBox {
|
||||
|
||||
int returnVal = fileChooser.showSaveDialog(mazeApp);
|
||||
if(returnVal == JFileChooser.APPROVE_OPTION) {
|
||||
System.out.println("You chose to save to this file: " +
|
||||
fileChooser.getSelectedFile().getName());
|
||||
String filename = fileChooser.getSelectedFile().getPath();
|
||||
return filename;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user