我正在努力学习 Python。我需要这个循环继续滚动,直到我点击屏幕。
我尝试使用win.getMouse
,但它不工作。
win = GraphWin("game of life", 600, 600)
win.setCoords(-1, -3, s+1, s+1)
q = True
while q:
board = iterate(board)
x = 0
while x < s:
y = 0
while y < s:
update_color(x, y, board, rec)
y = y + 1
x = x + 1
if win.getMouse():
q = False