Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

An Node.js EventEmitter version of Conway's Game of Life

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 examples
Octocat-spinner-32 .gitignore
Octocat-spinner-32 README.md
Octocat-spinner-32 eventfullife.bak
Octocat-spinner-32 eventfullife.js
Octocat-spinner-32 eventfullifecell.bak
Octocat-spinner-32 eventfullifecell.js
Octocat-spinner-32 package.json
README.md

Eventful Life

Node.js EventEmitter version of Conway's Game of Life

I wanted a more interesting example of how to use node.js events and EventEmitter. How about we make Conway's Life but instead of doing a round of updating every cells state simultantiously and then showing the the state, what if each cell listened to all it's adjacent cells for changes and then updated itself when it needed to? It seemed more interesting than make a Door object and then knocking on it to learn about events.

Check out the example html page to see Eventful Life in action.

To install use:

npm install eventfullife

To run the eventfullife.html page, switch to the examples directory, install browserify and jquery-browserify, and bundle the js files:

cd examples
npm install -g browserify
npm install jquery-browserify
browserify main.js -o bundle.js

Now open examples/eventfullife.html in your browser. I have only tested in Chrome. If you happen to try this in another browser then let me know how it works there!

Something went wrong with that request. Please try again.