Template:Conway's Game of Life gadget/doc
Appearance
![]() | This is a documentation subpage for Template:Conway's Game of Life gadget. It may contain usage information, categories and other content that is not part of the original template page. |
Usage
[edit]Use this template to create an interactive instance of Conway's Game of Life.
Parameter | Default value | Explanation |
---|---|---|
|autoplay= |
false | Whether to start the game automatically. |
|width= |
300 | The width of the canvas, in pixels. |
|height= |
150 | The height of the canvas, in pixels (excluding the control buttons). |
|zoom= |
4 | The initial zoom level, which is the amount of pixels per cell. |
|grid= |
off | Whether the grid is turned on. Only visible at zoom levels 4 or more. |
|cells= |
0,0; 0,1; 0,-1; -1,0; 1,1 |
A semicolon-separated list of cells that are initially on. Coordinates are relative to the center of the canvas. |
{{Conway's Game of Life gadget
| autoplay =
| width =
| height =
| zoom =
| grid =
| cells =
}}
Examples
[edit]R-pentomino
[edit]Markup | Renders as |
---|---|
|
|
Spaceships
[edit]Markup | Renders as |
---|---|
|
|
Blinkers
[edit]Markup | Renders as |
---|---|
|
|
"Toad" blinker, zoomed in, with autoplay and grid turned on:
Markup | Renders as |
---|---|
|
|
Template data
[edit]Use this template to create an interactive instance of Conway's Game of Life
Parameter | Description | Type | Status | |
---|---|---|---|---|
Autoplay | autoplay | Start the game automatically
| Boolean | optional |
Width | width | Width of the instance, in pixels
| Number | optional |
Height | height | Height of the instance, in pixels
| Number | optional |
Zoom | zoom | Initial zoom of the instance
| Number | optional |
Grid | grid | Initial state of the grid
| Boolean | optional |
Cells | cells | Initial cells of the instance, specified by a semicolon-separated list of coordinates
| String | optional |
Fallback | fallback | Fallback file or text, for users with JavaScript disabled or when printing
| Unknown | optional |