Skip to content

An attempt to implement conways game of life in python

Notifications You must be signed in to change notification settings

Le5tes/conways-game-of-life

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Conway's Game of Life

This is an implementation of the classic game of life.

  • Living cells die if they are too crowded (>3 living neighbours)
  • Living cells die if they are lonely (<2 living neighbours)
  • Dead cells are brought to life if 3 nearby cells are alive

The purpose of this is to try out some OOP in python.

There will be two main classes, board and cell.

Cell

  • Performs most of the game logic
  • Is initialised with references to the surrounding cells as a list.
  • Calculates its next status when #prep is called
  • Updates its status when #update is called

Board

  • Will create the cells on init
  • Will call the prep and update methods on each cell each tick/turn

There will likely also be a Timer class, and a visual interface class

About

An attempt to implement conways game of life in python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages