/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package SchedulesRecovery;

import InitialSchedules.ParametersInitialSchedules;
import static ScheduleUtil.EmployeeCostCalculator.*;

/**
 *
 * @author frabe
 */
public class RecoveringActionPartTimeEmployee extends RecoveringAction{
    
    public RecoveringActionPartTimeEmployee( int employee, int workPeriod){
        super(employee, workPeriod);
    }
    
    public void calculateRecoveringActionCost ( boolean[][] currentEmployeesSchedule, ParametersInitialSchedules myScheduleParameters) {
        int costBeforeAction = getPartTimeEmployeeCost(currentEmployeesSchedule[this.employee], myScheduleParameters);
        currentEmployeesSchedule[this.employee][this.workPeriod] = true;
        int costAfterAction = getPartTimeEmployeeCost(currentEmployeesSchedule[this.employee], myScheduleParameters);  
        currentEmployeesSchedule[this.employee][this.workPeriod] = false;
        this.recoveringActionCost = costAfterAction-costBeforeAction;
    }        
}

