def repeater(root): model.update_all() model.display_all() root.after(100,repeater,root)
def repeater(root): """By the script calling this function, the update_all/display_all in the model is called every 100 milliseconds in the GUI's/root thread, and then this function reschedules itself to be called in 100 milliseconds This makes the simulation update itself every .1 seconds""" model.update_all() model.display_all() root.after(100, repeater, root)
def repeater(root): "repeatly calling model to display all elements" global TICK TICK = not TICK model.display_all(TICK) root.after(200, repeater, root)
def initialize(): """The initial start screen""" model.start() model.display_all()
def repeater(root): model.update_all() model.display_all() root.after(100,repeater,root) #how many miliseconds to wait