Différences
Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédente | ||
teaching:progappchim:game_of_life_conway-2012 [2012/11/30 12:31] – créée villersd | teaching:progappchim:game_of_life_conway-2012 [2021/03/09 11:29] (Version actuelle) – villersd | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
====== Jeu de la vie de Conway ====== | ====== Jeu de la vie de Conway ====== | ||
+ | <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 17: | Ligne 19: | ||
Iain Haslam, June 2005. | Iain Haslam, June 2005. | ||
""" | """ | ||
- | from Tkinter | + | from tkinter |
import time | import time | ||
Ligne 93: | 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 175: | Ligne 177: | ||
root.mainloop() | root.mainloop() | ||
- | </sxh> | + | </code> |
===== Références ===== | ===== Références ===== |