Utopia  2
Framework for studying models of complex & adaptive systems.
Public Member Functions | Public Attributes | List of all members
Utopia::Models::GameOfLife::CellState Struct Reference

The type of a cell's state. More...

#include <GameOfLife.hh>

Public Member Functions

 CellState ()
 Construct the cell state with all dead cells as default. More...
 

Public Attributes

bool living
 Whether a cell lives or not. More...
 

Detailed Description

The type of a cell's state.

Constructor & Destructor Documentation

◆ CellState()

Utopia::Models::GameOfLife::CellState::CellState ( )
inline

Construct the cell state with all dead cells as default.

Set all cells to be dead as default. In the GameOfLife model constructor, the select_entity interface is used to set selected cells to be living. Implementing it here in the state constructor would be unnecessary costly wrt. performance because for each cell state created, all cells selected to be living would need to be calculated.

Member Data Documentation

◆ living

bool Utopia::Models::GameOfLife::CellState::living

Whether a cell lives or not.


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