     var dayScheduledOn: WorkDay
     var amountOfWork: Float
     var hasBeenCompleted: Bool
-    
+
     init(_ parentTask: Task, dayScheduledOn: WorkDay, amountOfWork: Float) {
         self.parentTask = parentTask
         self.dayScheduledOn = dayScheduledOn

        self.availableWorkTime.append(fri);
        self.availableWorkTime.append(sat);
    }
    
    private func workAvailableOnDate(date: NSDate) -> Float {
        if self.availableWorkTime.count < 7 {
            return 0
        }
        
        let dayOfWeek = NSCalendar.currentCalendar().components(NSCalendarUnit.Weekday, fromDate: date).weekday - 1
        return self.availableWorkTime[dayOfWeek]
    }
    
    func workDayForDate(date: NSDate) -> WorkDay {
        if let workDayIndex = self.workDays.indexOf({ $0.date.compare(date) == .OrderedSame }) {
            return self.workDays[workDayIndex]

user.tasks.append(Task(title: "Long Task 1", dueDate: dateFormatter.dateFromString("2015-10-05")!, priority: 3, workEstimate: 10.0))
user.tasks.append(Task(title: "Long Task 2", dueDate: dateFormatter.dateFromString("2015-10-06")!, priority: 4, workEstimate: 12.0))

// Schedule these tasks and print the schedule

scheduleTasksForUser(user)
user.droppedTasks
printScheduleForUser(user)

// Change the work estimate of Medium Tak 4 so it schedules

//medTask4.workEstimate = 2.0
scheduleTasksForUser(user)
user.droppedTasks
print("\n----------\n")
printScheduleForUser(user)

