Skip to content

Latest commit

 

History

History
27 lines (14 loc) · 1.28 KB

File metadata and controls

27 lines (14 loc) · 1.28 KB

Conway's Game of Life in JSON

This web app is an attempt at creating a Conway's game of life from a JSON markup, powered by cell.js, a JSON-based web app framework.

The entire app logic is expressed with a single declarative JSON object:

img

When you run it, it looks like this:

img

Demo

Try out the demo at https://intercellular.github.io/conway/

How it works

The app is powered by cell.js, which enables the JSON based approach to building web apps.

To be able to write the entire app in near-100% JSON markup format, we use two $virus:

  1. conway.virus.js: Generates the game of life sandbox DOM.
  2. dna.virus.js: Re-generates the "DNA" sequence from which the conway's game of life builds itself.

The whole point of $virus is that developers can abstract reusable logic into functions that take a JSON object as input and return another JSON as output, thereby "infecting" the original cell. And this is how cell.js implements plugins.