Skip to content

Commit

Permalink
edit Manager and TaskList class
Browse files Browse the repository at this point in the history
  • Loading branch information
fxe025 committed Mar 7, 2024
1 parent edaf18d commit f8044ec
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/java/Parser/Manager.java
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
package Parser;

import Storage.DukeFile;
import TaskList.DeleteTask;
import TaskList.Task;
import Ui.PrintTask;
import Ui.PrintText;

import java.util.ArrayList;
import java.util.Scanner;

import static TaskList.AddTask.addSpecialTask;
import static TaskList.TaskList.deleteTask;
import static TaskList.TaskList.newSpecialTask;

public class Manager {
/**
Expand Down Expand Up @@ -42,7 +42,7 @@ public static void taskListManager(ArrayList<Task> tasks) {
case "todo":
case "deadline":
case "event":
Task specialTask = addSpecialTask(text);
Task specialTask = newSpecialTask(text);
if (specialTask.getType() != ' ') {
tasks.add(specialTask);
index++;
Expand All @@ -51,7 +51,7 @@ public static void taskListManager(ArrayList<Task> tasks) {
}
break;
case "delete":
DeleteTask.delete(userInputWords, tasks);
deleteTask(userInputWords, tasks);
index--;
PrintTask.printMultipleToFile(tasks, false);
break;
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/TaskList/TaskList.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,8 @@ public void newTasks() {
public static Task newSpecialTask(String description) {
return AddTask.addSpecialTask(description);
}

public static void deleteTask(String[] userInputWords, ArrayList<Task> tasks) {
DeleteTask.delete(userInputWords, tasks);
}
}

0 comments on commit f8044ec

Please sign in to comment.