JPARMSTRONG.com
Conway's Game of Life

Glider from Conway's Game of Lifeis a zero-player game developed by John Conway in 1970. You can learn more about Conway's Game of Life on wikipedia. The version I present to you was developed using Python. Never having programmed in Python before I felt this game would be a fun and challenging way of learning it.

There are four rules the game follows: (copied from wikipedia)

  1. Any live cell with fewer than two live neighbours dies, as if by loneliness.
  2. Any live cell with more than three live neighbours dies, as if by overcrowding.
  3. Any live cell with two or three live neighbours lives, unchanged, to the next generation.
  4. Any dead cell with exactly three live neighbours comes to life.

The program was developed under Windows XP using Python 2.5. I have not tried it with Linux or Mac, but with some small modifications it should work.

Update: I made a GUI version using pygame and a video to demonstrate it. I added some extra things like random colors and corners that wrap around. These are things you won't find in the original Conway's Game of Life. The GUI and text-based version are very similar. If you compare them side-by-side you'll see a lot of it is the same code. 

 

Screenshots

Download

My version of the Conway's Game of Life source code is protected under the GNU General Public License.

Download the text-based version
Download the GUI version
 
 
Thursday August 14th, 2008 10:25 AM

Comments

Iron
Would help if there was a straight EXE in there. ;)
Thursday October 30th, 2008 2:46 PM

Add Comment

Name: Reserve name? Keep people from pretending to be you.
Email:
 
Human Identifier:
 
We won't spam, sell or make your email public.