Runs the Game of Life in the console.
game-of-life run [options]
Option | Alias | Description | Default Value |
---|---|---|---|
--width | -w | Sets the width of the grid. | 30 |
--height | -h | Sets the height of the grid. | 30 |
--iterations | -i | Sets the number of iterations to perform. | 100 |
--initial-delay | -id | Sets the delay (in ms) for which the first iteration is shown. | 1000 |
--delay | -d | Sets the delay (in ms) between iterations. | 200 |
--back-color | -b | Sets the background color of the grid. | Grey15 |
--base-color | -c | Sets the color of the cells. | Red1 |
--pattern | -p | Seeds the initial iteration with a known pattern. | - |
--qr-code | -q | Seeds the initial iteration with a QR code. | - |
When the game runs, cell aging is used to highlight cells that survive more than one generation. These cells appear in a darker color (or lighter if a dark base color is used).
game-of-life.exe run --width 40 --height 40 --back-color Grey15 --base-color Red1
The initial iteration can be seeded using a QR code using the --qr-code
option.
A QR code in an image file can be used:
game-of-life.exe run --qr-code [path of qr code image]
Alternatively, the url of a QR code in an image can be used:
game-of-life.exe run --qr-code [url of qr code image]
A QR code can be generated from text:
game-of-life.exe run --qr-code "some text"
The initial iteration can be seeded from a known pattern when using the --pattern
option.
The available patterns can be shown using the show-patterns
command:
game-of-life.exe show-patterns
The color of the grid and the cells can be set using the --back-color
and --base-color
options.
The available colors can be shown using the show-colors
command:
game-of-life.exe show-colors