Beispiel #1
0
 // 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);
 }
Beispiel #2
0
 // Mark the given task as complete.
 public void markTaskComplete(MinionTask task)
 {
     inProgressTasks.Remove(task);
 }
Beispiel #3
0
 // 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));
 }