def __init__(self, steps, Tmult, inv): threading.Thread.__init__(self) self.steps = steps self.Tmult = Tmult self.time = Tmin * Tmult if inv == True: self.A = IO.getE() self.B = IO.getF() self.C = IO.getG() self.D = IO.getH() else: self.A = IO.getA() self.B = IO.getB() self.C = IO.getC() self.D = IO.getD() IO.output(self.A, False) IO.output(self.B, False) IO.output(self.C, False) IO.output(self.D, False)
def Step2(): IO.output(self.D, True) IO.output(self.C, True) sleep(self.time) IO.output(self.D, False) IO.output(self.C, False)
def Step6(): IO.output(self.A, True) IO.output(self.B, True) sleep(self.time) IO.output(self.A, False) IO.output(self.B, False)
def Step8(): IO.output(self.D, True) IO.output(self.A, True) sleep(self.time) IO.output(self.D, False) IO.output(self.A, False)
def Step4(): IO.output(self.B, True) IO.output(self.C, True) sleep(self.time) IO.output(self.B, False) IO.output(self.C, False)