EleFits  5.0.0
A modern C++ API on top of CFITSIO
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.
 
const PtrRaster< Value, 2 > & generate (long count)
 Generate lifes at random positions. More...
 
const VecRaster< Value, 3 > & run ()
 Run the game.
 
long next ()
 Move to the next frame.
 
const PtrRaster< Value, 2 > & update ()
 Update the current frame.
 
long countLifes (const Position< 2 > &p) const
 Count lifes around a given position.
 
bool isInDomain (const Position< 2 > &p) const
 Check whether a given position is in the board domain.
 

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