Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

README

This project is simply an implementation of Conway's Game of Life in coffeescript for the HTML canvas element. My goal was to make the code as easy-to-understand as possible. I tried to do this with semantically organized classes, as follows:

A Field is a 2d-array of Cells.
A Cell is a Neighborhood, some Effects, and a Billboard.
A Neighborhood is a set of references to eight nearby Cells.
An Effect is protected state which generates a Color for each frame depending on the state of the other Effects in the surrounding Neighborhood.
A Billboard is a rectangle that is repeatedly drawn on an HTML canvas in a certain Color.
A Color is some amount of alpha, red, green, and blue.

The program initializes a Field of Cells then repeatedly calculates the changes in Effects to each of those Cells, displaying the resulting Colors on Billboards using an HTML canvas.

About

Canvas game of life with color

Resources

Releases

No releases published
You can’t perform that action at this time.