Skip to content

alande-amorim/conways-game-of-life-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Conway's Game of Life in HTML5

Screenshot

Live Demo

https://alande-amorim.github.io/conways-game-of-life-js/

This project

This is a tribute to famous british mathematician John Conway that passed away in April 2020 at age of 82. This is my implementation of his famous creation The Game of Life.

Techs

Just simple stuff, nothing fancy.

  • HTML
  • CSS
  • Javascript

What is it?

The Game of Life is a cellular automaton by the British mathematician John Conway in 1970. It is a zero-player game, meaning that its evolution is determined by its initial state and very simple rules, requiring no further input. One interacts with the Game of Life by creating an initial configuration and observing how it evolves.

Rules

  • Any live cell with fewer than two live neighbours dies, as if by underpopulation.
  • Any live cell with two or three live neighbours lives on to the next generation.
  • Any live cell with more than three live neighbours dies, as if by overpopulation.
  • Any dead cell with exactly three live neighbours becomes a live cell, as if by reproduction.

How to play

  • Click on the tiles of the board to draw any pattern you want.
  • Click 'Play' and watch what happens.
  • Watch. Can you preddict what will happen next?

Patterns

Many different patterns can be observed in the Game of Life which are classified according to their behavior. They are categorized into: still (does not change over generations), oscillators (oscillates between two or more states) or spaceships (oscilates shape while moving around).

Still lifes
Block Game of life block with border.svg
Bee-hive Game of life beehive.svg
Loaf Game of life loaf.svg
Boat Game of life boat.svg
Tub Game of life flower.svg

Oscillators
Blinker
(period 2)
Game of life blinker.gif
Toad
(period 2)
Game of life toad.gif
Beacon
(period 2)
Game of life beacon.gif
Pulsar
(period 3)
Game of life pulsar.gif
Penta-
decathlon
(period 15)
I-Column.gif
Spaceships
Glider Game of life animated glider.gif
Light-
weight
spaceship
(LWSS)
Game of life animated LWSS.gif
Middle-
weight
spaceship
(MWSS)
Animated Mwss.gif
Heavy-
weight
spaceship
(HWSS)
Animated Hwss.gif

source: wikipedia