|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Conway's Game of Life over a toroidal 2D lattice. More...
#include <chrono>#include <cerrno>#include <cstdlib>#include <iostream>#include <limits>#include <string>#include <thread>#include <utility>#include <vector>#include <ca-traits.H>#include <tpl_ca_storage.H>#include <tpl_ca_lattice.H>#include <ca-engine-utils.H>Go to the source code of this file.
Functions | |
| int | main (int argc, char **argv) |
Conway's Game of Life over a toroidal 2D lattice.
Builds a Phase 3 Synchronous_Engine through make_gol_engine(), stamps one of the canonical Life patterns into the initial frame and renders each synchronous step in-place on stdout.
Usage: ca_game_of_life_example [pattern] [steps] [width] [height]
Available patterns: block — 2x2 still life blinker — period-2 oscillator toad — period-2 oscillator beacon — period-2 oscillator glider — diagonal spaceship (default) r-pentomino — methuselah; long-lived chaotic activity gosper — Gosper glider gun
Defaults: glider, 40 steps, 32x16 toroidal grid.
Definition in file ca_game_of_life_example.cc.
| int main | ( | int | argc, |
| char ** | argv | ||
| ) |
Definition at line 213 of file ca_game_of_life_example.cc.
References Aleph::and, Aleph::blossom_maximum_cardinality_matching(), engine, Aleph::CA::make_gol_engine(), and steps.