Skip to content

Commit

Permalink
corrected bye command to terminate program
Browse files Browse the repository at this point in the history
  • Loading branch information
Chiarena committed Feb 25, 2024
1 parent 11e9506 commit f829900
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/main/java/actions/Parser.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,31 +53,28 @@ public boolean parse(TaskList tasklist, Ui ui) {


}
return false;
return isExit;
}

public void handleMarkCommand(TaskList taskList, Ui ui, String[] parts) {
int num = Integer.parseInt(parts[1]);
Task current = taskList.getTask(num -1);
taskList.markTask(current);
ui.printMarkMessage(current);
// save
}

public void handleUnmarkCommand(TaskList taskList, Ui ui, String[] parts) {
int num = Integer.parseInt(parts[1]);
Task current = taskList.getTask(num -1);
taskList.unmarkTask(current);
ui.printUnmarkMessge(current);
// save
}

public void handleDeleteCommand(TaskList taskList, Ui ui, String[] parts) {
int num = Integer.parseInt(parts[1]);
Task current = taskList.getTask(num -1);
taskList.deleteTask(num-1);
ui.printDeleteMessage(current, taskList.getArraySize());
// save
}

public void handleTodoCommand(TaskList taskList, Ui ui, String[] parts) {
Expand All @@ -89,7 +86,6 @@ public void handleTodoCommand(TaskList taskList, Ui ui, String[] parts) {
Task todo = new Todo(task, false);
taskList.addTask(todo);
ui.printAddMessage(todo, taskList.getArraySize());
// save
}

} catch (DukeException e) {
Expand Down

0 comments on commit f829900

Please sign in to comment.