// Add the given task to the manager. If the given task is equivalent to // a task that is currently in progress, it will not be added. public bool addTask(MinionTask task) { if (!inProgressTasks.ContainsKey(task)) { tasks.Add(task); return(true); } return(false); }
// Mark the given task as complete. public void markTaskComplete(MinionTask task) { inProgressTasks.Remove(task); }
// Remove the given task from the task manager. public void removeTask(MinionTask task) { tasks.Remove(task); }
public bool Equals(MinionTask other) { return(other.position.Equals(position) && other.name.Equals(name)); }