Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente | ||
| teaching:progappchim:game_of_life_conway-2012 [2015/10/16 12:05] – villersd | teaching:progappchim:game_of_life_conway-2012 [2021/03/09 11:29] (Version actuelle) – villersd | ||
|---|---|---|---|
| Ligne 2: | Ligne 2: | ||
| <note tip> | <note tip> | ||
| </ | </ | ||
| - | <sxh python; title : Conway_Game_of_Life_2D-JK-2012.py> | + | |
| + | <code python Conway_Game_of_Life_2D-JK-2012.py> | ||
| # | # | ||
| # -*- coding: utf-8 -*- | # -*- coding: utf-8 -*- | ||
| Ligne 18: | Ligne 19: | ||
| Iain Haslam, June 2005. | Iain Haslam, June 2005. | ||
| """ | """ | ||
| - | from Tkinter | + | from tkinter |
| import time | import time | ||
| Ligne 94: | Ligne 95: | ||
| for Cell in row: | for Cell in row: | ||
| Cell.stepToNextState() | Cell.stepToNextState() | ||
| - | print self.calc() | + | print(self.calc()) |
| | | ||
| def clear(self): | def clear(self): | ||
| Ligne 176: | Ligne 177: | ||
| root.mainloop() | root.mainloop() | ||
| - | </sxh> | + | </code> |
| ===== Références ===== | ===== Références ===== | ||