using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MDC.ProductionSystem
{
    static partial class MachineIsConnectedToConveyorBeltBuilder
    {       
        private static bool CanAcceptMachineAsSource(Machine machine)
        {
            if (machine is Garage)
                return false;
            if (machine is QualityControl)
                if (machine.MA_CB_ConveyorBelts.Count > 1)
                    return false;
            if (!(machine is QualityControl))
                if (machine.MA_CB_ConveyorBelts.Count > 0)
                    return false;
            return true;
        }

        private static bool CanAcceptMachineAndConveyorBeltAsSourceAndTarget(Machine machine, ConveyorBelt conveyorBelt)
        {
            return CanAcceptMachineAsSource(machine);
        }
    }
}
