Skip to content

s-mv/game-of-life

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Conway's Game of Life

by smv

What is this?

The Game of Life, also known simply as Life, is a cellular automaton devised by the British mathematician John Horton Conway in 1970.
Read more here.
I just made it in C for fun. Web version here.

How to play?

Controls

  • Holding space pauses the game while releasing it resumes. When held:
    • click/drag to add cell(s)
    • shift + click/drag to remove tiles
    • right arrow key to move ahead by one frame

Custom rules

Pressing shift will toggle the rules bar.
The rules can be something like l3=0 m4=1 =6=0 for example

  • l means less than, r means more than and = means, well, equal to.
  • The number just after defines the number of cells.
  • The number at the end defines if a cell should be alive or dead if true. So l3=0 translates to if less than 3 neighbours, cell should be dead

How to build?

make build

Run using

npm run dev

Or serve . using a web server of your choice. Or try the web version directly here :P