本文整理匯總了Python中game_of_life.GameOfLife._start_configuration_方法的典型用法代碼示例。如果您正苦於以下問題:Python GameOfLife._start_configuration_方法的具體用法?Python GameOfLife._start_configuration_怎麽用?Python GameOfLife._start_configuration_使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類game_of_life.GameOfLife
的用法示例。
在下文中一共展示了GameOfLife._start_configuration_方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: Tk
# 需要導入模塊: from game_of_life import GameOfLife [as 別名]
# 或者: from game_of_life.GameOfLife import _start_configuration_ [as 別名]
except TclError:
pass
master = Tk()
canvas = Canvas(master, width=800, height=800)
canvas.pack()
canvas.bind("<Button 1>", _clicked_)
button = Button(master, text='Start', width=25, command=_on_start)
button.pack()
num_rows = 100
num_cols = 100
width = 8
game = GameOfLife(canvas, num_rows, num_cols, width, None)
start_configuration = [(4,3), (4,4), (3,4), (3,3), (20,20), (21,20), (22,20), (22,21), (21,22)]
game._start_configuration_(start_configuration)
mainloop()