Sin( x y ) Image Border.

GAME OF LIFE


Game of Life in Javascript

This is an implementation of J. H. Conway's cellular automata game of life in Javascript where the game board is a topologically a torus. See my design notes for a description of the game and how it is designed.

Your browser does not support the canvas API so I can't show game of life!
Game Controls
Number of neighbors to survive
Number of neighbors for empty cell birth
File I/O
Life Patterns

--- Game State ---

--- Cell State ---

Clipboard

Game of Life Debug Information

--- Life state ---

Software Architecture

It's in two parts, HTML/CSS for the user interface and the Javascript for the actions.

Preloading the JavaScript

In this HTML file, overview.html, we preload the Javascript program gameOfLife.js in the head section.

Canvas, Forms and Controls

First, we set up a page wide canvas for the game board.

Game controls and status buttons are HTML forms. Their styles defined by CSS. The controls have types and ID's to tie them to the Javascript.

Initializing the Game

We create the Game of Life object by invoking var gameOfLife = new GameOfLifeApp() ; after loading the forms and defining the controls. It does the following:

Download

Source code is distributed under the terms of the GNU General Public License. The current version number is 3.0

gameOfLife.js Game of Life implemented in Javascript Eye icon for source code viewing. View     Compact disk icon for source code download. Download
overview.html HTML code for this page which calls gameOfLife.js Eye icon for source code viewing. View     Compact disk icon for source code download. Download

Debugging

The browsers (Safari, Firefox, Opera) have developer tools for debugging,
Safari Web Browser Developer Tools
Safari Web Browser Developer Tools

Copyright © 1986-2017 by Sean Erik O'Connor. All Rights Reserved.     last updated 07 Nov 17.