I want to simulate the game of life problem using python. I want to draw a grid and be able to color its cells as the simulation progresses. How do I do that in Python?
A:
I suggest taking a look at the Python Imaging Library (PIL) documentation
Kimvais
2010-02-15 08:09:10
I think that for a game PyGame is a better fit as it also draws to the screen.
extraneon
2010-02-15 08:17:28
+4
A:
You can use pygame to do that.
To display the state of your simulation, you should create an 8 bit surface with a palette, and access it with the pygame.surfarray module.
Luper Rouch
2010-02-15 08:13:06
+1
A:
I suggest Gloss, it's like PyGame except hardware accelerated. It also provides many other game-programming goodies.
Stefan Monov
2010-02-15 08:26:05
Just be careful on the licensing implications of Gloss as it's GPLv3 rather than PyGame's LGPL.
Trevor Tippins
2010-02-15 10:20:18
Gloss' README states that version 0.85 (2010-01-23) was relicensed under the LGPL.
Winston C. Yang
2010-08-21 18:55:44