def repeater_layers(layers, zdistance, reps): zmove = Keystroker.get_z_moves(zdistance) newlayers = [] for x in range(1, reps): newlayers += deepcopy(layers) newlayers[-1].onexit = zmove newlayers += deepcopy(layers) return newlayers
def repeater_keys(keys, zdistance, reps): zmove = Keystroker.get_z_moves(zdistance) # assemble repetition of z layers' keys keys = ((keys + zmove) * (reps - 1)) + keys return keys