CellViz  1.0
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
ParticleLife Class Reference

====== END OF ABSTRACT CLASSES ====== /// More...

#include <cells.h>

Inheritance diagram for ParticleLife:
ContinuousAutomaton CellularAutomaton

Public Member Functions

 ParticleLife ()
 Default constructor for ParticleLife. More...
 
 ParticleLife (int x, int y, string species)
 Parameterized constructor for ParticleLife. More...
 
 ParticleLife (const ParticleLife &cell)
 
int get_x ()
 
int get_y ()
 
string get_species ()
 
- Public Member Functions inherited from CellularAutomaton
virtual ~CellularAutomaton ()=default
 

Static Public Member Functions

static Board compute (Board *board)
 Computes the state of the board with ParticleLife rules. More...
 
- Static Public Member Functions inherited from ContinuousAutomaton
static void compute (Board *board)
 

Private Attributes

int x
 
int y
 
string species
 

Additional Inherited Members

- Protected Member Functions inherited from CellularAutomaton
 CellularAutomaton ()=default
 
- Static Protected Member Functions inherited from CellularAutomaton
static void compute (Board *board)
 

Detailed Description

====== END OF ABSTRACT CLASSES ====== ///

Represents a type of continuous cellular automaton called ParticleLife.

Constructor & Destructor Documentation

◆ ParticleLife() [1/3]

ParticleLife::ParticleLife ( )

Default constructor for ParticleLife.

◆ ParticleLife() [2/3]

ParticleLife::ParticleLife ( int  x,
int  y,
string  species 
)

Parameterized constructor for ParticleLife.

Parameters
xThe x-coordinate of the ParticleLife cell.
yThe y-coordinate of the ParticleLife cell.
speciesThe species identifier for the ParticleLife cell.

◆ ParticleLife() [3/3]

ParticleLife::ParticleLife ( const ParticleLife cell)
inline

Member Function Documentation

◆ compute()

Board ParticleLife::compute ( Board board)
static

Computes the state of the board with ParticleLife rules.

Parameters
boardPointer to the Board instance.
Returns
A modified Board instance.

◆ get_species()

string ParticleLife::get_species ( )

◆ get_x()

int ParticleLife::get_x ( )

◆ get_y()

int ParticleLife::get_y ( )

Member Data Documentation

◆ species

string ParticleLife::species
private

◆ x

int ParticleLife::x
private

◆ y

int ParticleLife::y
private

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