Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app
css
dist
.babelrc
.eslintrc.js
.gitignore
README.md
package.json
screenshot.gif
webpack.config.js

README.md

Game Of Life

Based on Conway's Game of Life

Features

  • On load, a randomly generated board will start playing
  • Generations: counts how many generations have elapsed
  • Start/Stop simulation
    • Next: manually advance 1 generation (used best in pause mode)
    • Run: automatically play simulation (time steps are determined by simulation speed controls); will stop automatically if board is empty
    • Pause: pauses simulation
    • Clear: clears board (for manual set up); also resets generations count
  • Set up board
    • Players can click on a cell to toggle its state (alive/dead)
  • Adjust grid size
    • Players can choose from 3 grid sizes
  • Adjust simulation speed
    • Players can choose from 3 simulation speeds

Code

The game logic is in Javascript.

Raw Javascript files are in the app directory. Compiled Javascript files are in the dist directory.

Javascript files will compile using babel/webpack by running:

$ npm run production

or in watch mode

$ npm run watch

Javascript

To install JS dev dependencies (listed in package.json):

npm install

If you install any new JS dev dependencies, use the --save-dev option to list in package.json:

npm install <package-name> --save-dev

View

To view, open the following in your browser:

./dist/index.html

Demo

View working demo at http://jennhsu.com/gameoflife/

Screenshot

screenshot