def satu(): global lift global lantai if (lantai[0] < lift): while (lantai[0] != lift): lift -= 1 time.sleep(1) eel.update_lift(lift) time.sleep(1)
def enam(): global lift global lantai if (lantai[5] > lift): while (lantai[5] != lift): lift += 1 time.sleep(1) eel.update_lift(lift) time.sleep(1)
def liftturun(): global user global lift if (lift > user): while (lift != user): lift -= 1 time.sleep(1) eel.update_lift(lift) time.sleep(1) elif (lift < user): while (lift != user): lift += 1 time.sleep(1) eel.update_lift(lift) time.sleep(1)
def dua(): global lift global lantai if (lantai[1] > lift): while (lantai[1] != lift): lift += 1 time.sleep(1) eel.update_lift(lift) time.sleep(1) elif (lantai[1] < lift): while (lantai[1] != lift): lift -= 1 time.sleep(1) eel.update_lift(lift) time.sleep(1)
def empat(): global lift global lantai if (lantai[3] > lift): while (lantai[3] != lift): lift += 1 time.sleep(1) eel.update_lift(lift) time.sleep(1) elif (lantai[3] < lift): while (lantai[3] != lift): lift -= 1 time.sleep(1) eel.update_lift(lift) time.sleep(1)