forked from nus-cs2103-AY2223S2/ip
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Created a new GUI for Duke. Some minor bug fixes.
- Loading branch information
1 parent
23582be
commit d6f3ddd
Showing
19 changed files
with
362 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,19 @@ | ||
import duke.*; | ||
import duke.command.Command; | ||
import duke.Storage; | ||
import duke.gui.Ui; | ||
import duke.TaskList; | ||
import duke.Parser; | ||
import duke.gui.Start; | ||
|
||
import java.io.*; | ||
import javafx.application.Application; | ||
|
||
public class Duke { | ||
public class Duke{ | ||
private Ui ui; | ||
private Storage storage; | ||
private TaskList tasks; | ||
private Parser parser; | ||
|
||
public Duke(String filepath) { | ||
ui = new Ui(); | ||
storage = new Storage(filepath); | ||
parser = new Parser(); | ||
try { | ||
tasks = new TaskList(storage.load()); | ||
}catch (IOException e) { | ||
ui.showLoadingError(); | ||
tasks = new TaskList(); | ||
} | ||
} | ||
public void run() { | ||
boolean isExit = false; | ||
while (!isExit) { | ||
try { | ||
String fullCommand = ui.readCommand(); | ||
Command c = parser.parse(fullCommand,ui); | ||
c.execute(tasks,ui,storage); | ||
isExit = c.isExit(); | ||
} catch (IOException | NullPointerException e) { | ||
|
||
} | ||
} | ||
} | ||
public static void main(String[] args){ | ||
new Duke("data/duke.txt").run(); | ||
Application.launch(Start.class); | ||
} | ||
|
||
//Error Checking Methods | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.