GithubHelp home page GithubHelp logo

life's Introduction

Game of Life in Javascript

This is a minimal implementation of Conway's Game of Life, for the purposes of exploring different Javascript user interface frameworks.

So far there are implementations using:

  • native Javascript graphics (HTML5 canvas)
  • D3.js (SVG)
  • React.js (SVG)

Installation

Clone this repo:

[rule146@rule146: code]$ git clone https://github.com/jskelcy/life.git
Cloning into 'life'...
remote: Counting objects: 178, done.
remote: Compressing objects: 100% (124/124), done.
remote: Total 178 (delta 70), reused 147 (delta 53)
Receiving objects: 100% (178/178), 259.97 KiB | 0 bytes/s, done.
Resolving deltas: 100% (70/70), done.
Checking connectivity... done.
[rule146@rule146: code]$ cd life/

Check out the branch with the implementation you're interested in. To see the HTML5 canvas implementation check out the 'canvas' branch:

[rule146@rule146: life]$ git checkout canvas
Switched to branch 'canvas'
Your branch is up-to-date with 'origin/canvas'.

For the d3.js implementation, check out the 'd3' branch:

[rule146@rule146: life]$ git checkout d3
Switched to branch 'd3'
Your branch is up-to-date with 'origin/d3'.

The react.js implementation is (currently) on the 'master' branch:

[rule146@rule146: life]$ git checkout master
Switched to branch 'master'
Your branch is up-to-date with 'origin/master'.

Start a local http server in this repo (here I'm using port 8000) and open localhost in chrome:

[rule146@rule146: life]$ python -m SimpleHTTPServer 8000 &
[1] 3548
[rule146@rule146: life]$ Serving HTTP on 0.0.0.0 port 8000 ...
[rule146@rule146: life]$ open -a /Applications/Google\ Chrome.app/ http://localhost:8000

You should see a grid and some buttons for controlling the update animation:

Game of Life screenshot

Here's what the animation looks like:

Game of Life animation

Project page

See the project page here.

life's People

Contributors

jskelcy avatar paul-jean avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.