tags:

views:

111

answers:

4

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
I think that for a game PyGame is a better fit as it also draws to the screen.
extraneon
+2  A: 

Take a look at PyGame too.

Trevor Tippins
+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
+1  A: 

I suggest Gloss, it's like PyGame except hardware accelerated. It also provides many other game-programming goodies.

Stefan Monov
Just be careful on the licensing implications of Gloss as it's GPLv3 rather than PyGame's LGPL.
Trevor Tippins
Gloss' README states that version 0.85 (2010-01-23) was relicensed under the LGPL.
Winston C. Yang