private void custom_algorithm(Object obj)
    {
        if (alternate==false)
        {
                    if(((Elevator)obj).Get_direction() == true)
                    {
                        if(((Elevator)obj).Half_Increment() == false)
                        {
                            ((Elevator)obj).Decrement();
                        }
                    }
                    else if(((Elevator)obj).Get_direction() == false)
                    {
                        if(((Elevator)obj).Decrement() == false)
                        {
                            ((Elevator)obj).Increment();
                            alternate=true;
                        }
                    } 
        }
        else
        {
        
        
                    if(((Elevator)obj).Get_direction() == true)
                    {
                        if(((Elevator)obj).Increment() == false)
                        {
                            ((Elevator)obj).Decrement();
                        }
                    }
                    else if(((Elevator)obj).Get_direction() == false)
                    {
                        if(((Elevator)obj).Decrement() == false)
                        {
                            ((Elevator)obj).Half_Increment();
                            alternate=false;
                        }
                    }   
        }
    }