()
| 23 | build_graph() |
| 24 | |
| 25 | def build_graph(): |
| 26 | # Build GUI environment. |
| 27 | global graph |
| 28 | root = Tk() |
| 29 | root.overrideredirect(True) |
| 30 | root.geometry('%dx%d+%d+%d' % (WIDTH, HEIGHT, (root.winfo_screenwidth() - WIDTH) / 2, (root.winfo_screenheight() - HEIGHT) / 2)) |
| 31 | root.bind_all('<Escape>', lambda event: event.widget.quit()) |
| 32 | graph = Canvas(root, width=WIDTH, height=HEIGHT, background='white') |
| 33 | graph.after(40, update) |
| 34 | graph.pack() |
| 35 | |
| 36 | def update(): |
| 37 | # Main simulation loop. |
no test coverage detected