EleFits  5.3.1
A modern C++ API on top of CFITSIO
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
GameOfLife Class Reference

#include <GameOfLife.h>

Detailed Description

A Game of Life as an example usage of Raster and a few features like slicing.

Public Types

using Value = unsigned char
 The cell type.
 

Public Member Functions

 GameOfLife (long width, long height, long turns)
 Constructor.
 
long count_lives (const Position< 2 > &p) const
 Count lives around a given position.
 
const PtrRaster< Value, 2 > & generate (long count)
 Generate lives at random positions. More...
 
bool is_in_domain (const Position< 2 > &p) const
 Check whether a given position is in the board domain.
 
long next ()
 Move to the next frame.
 
const VecRaster< Value, 3 > & run ()
 Run the game.
 
const PtrRaster< Value, 2 > & update ()
 Update the current frame.
 

The documentation for this class was generated from the following file: