public StepDropSlotController()
 {
     _dropSlots[0] = new StepDropSlot(1, BrewProfileSettings.Instance.DropSlot1);
     _dropSlots[1] = new StepDropSlot(2, BrewProfileSettings.Instance.DropSlot2);
     _dropSlots[2] = new StepDropSlot(3, BrewProfileSettings.Instance.DropSlot3);
     _dropSlots[3] = new StepDropSlot(4, BrewProfileSettings.Instance.DropSlot4);
     _dropSlots[4] = new StepDropSlot(5, BrewProfileSettings.Instance.DropSlot5);
     _dropSlots[5] = new StepDropSlot(6, BrewProfileSettings.Instance.DropSlot6);
 }
        public void DropStep(IStep step)
        {
            StepDropSlot slot = _dropSlots.FirstOrDefault(s => s.Steps.Contains(step));

            if (slot != null)
            {
                //Make sure that all appropriate hatches has been released before we
                //open one that is higher up in the chain.
                switch (slot.SlotId)
                {
                case 2:
                    if (!_dropSlots[0].HasDropped)
                    {
                        _dropSlots[0].Drop();
                    }
                    break;

                case 3:
                    if (!_dropSlots[0].HasDropped)
                    {
                        _dropSlots[0].Drop();
                    }
                    if (!_dropSlots[1].HasDropped)
                    {
                        _dropSlots[1].Drop();
                    }
                    break;

                case 5:
                    if (!_dropSlots[3].HasDropped)
                    {
                        _dropSlots[3].Drop();
                    }
                    break;

                case 6:
                    if (!_dropSlots[3].HasDropped)
                    {
                        _dropSlots[3].Drop();
                    }
                    if (!_dropSlots[4].HasDropped)
                    {
                        _dropSlots[4].Drop();
                    }
                    break;
                }
                slot.Drop();
            }
        }