Skip to content
This repository has been archived by the owner on Jun 11, 2023. It is now read-only.
/ GameOfLife Public archive

My simple version of Conway's Game of Life, written in Python using Numpy and Pygame.

License

Notifications You must be signed in to change notification settings

Charly98cma/GameOfLife

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Conway's Game of Life

Rules

  1. Any live cell with two or three live neighbours survives.
  2. Any dead cell with three live neighbours becomes a live cell.
  3. All other live cells die in the next generation. Similarly, all other dead cells stay dead.

Additional rules

  • Births and deaths occur simultaneously (tick)
  • Each generation is a pure function of the preceding one.

How to use ("play" maybe)

The first thing you need is the initial layout, which is specified in a file which you will pass as an argument to the Python script (the name of the file is irrelevant).

This file must follow the next structure:

  • The first number must be the dimensions of the world (it a square, so only one number is required).
  • The next numbers will be a pair of values, separated by a coma, on each line, which represent the coordinates of the cells that are alive at the start of the program.

Save the file and run the script.

About

My simple version of Conway's Game of Life, written in Python using Numpy and Pygame.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages