Godot Nature of Code  1.2.0
Nature of Code implemented in Godot Engine
Public Member Functions | List of all members
Automata.GameOfLife Class Reference

Boolean cellular automata 2D. More...

Inheritance diagram for Automata.GameOfLife:
Automata.CellularAutomata2D< BoolCell, bool >

Public Member Functions

 GameOfLife ()
 Create a standard game of life of scale 20. More...
 
 GameOfLife (int scale)
 Create a Game of Life instance of custom scale. More...
 
- Public Member Functions inherited from Automata.CellularAutomata2D< BoolCell, bool >
 CellularAutomata2D ()
 Create a default cellular automata with a cell scale of 20. More...
 
 CellularAutomata2D (int scale)
 Create a default cellular automata with a custom cell scale. More...
 
virtual void RandomizeGrid ()
 Randomize grid. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Automata.CellularAutomata2D< BoolCell, bool >
virtual Vector2 GetAutomataBounds ()
 Get automata bounds. More...
 
virtual void InitializeGrid ()
 Initialize grid. More...
 
virtual void InitializeCell (TCell cell, int i, int j)
 Initialize cell. More...
 
virtual void ReviveCellAtScreenPos (Vector2 pos)
 Revive cell at screen position. More...
 
virtual int GetAliveNeighborsFromCell (int x, int y)
 Get alive neighbors from cell position. More...
 
virtual T ApplyRules (int x, int y)
 Apply rules on cell and return next state. More...
 
virtual void Generate ()
 Create a new generation. More...
 
- Protected Attributes inherited from Automata.CellularAutomata2D< BoolCell, bool >
TCell[] _grid
 Grid nodes More...
 
int _scale
 Cell scale More...
 
int _rows
 Row count More...
 
int _cols
 Cols count More...
 
int _generation
 Current generation More...
 
Node2D _gridContainer
 Grid container More...
 
- Properties inherited from Automata.CellularAutomata2D< BoolCell, bool >
float WaitTime [get, set]
 Wait time More...
 
Color CellColor [get, set]
 Cell color More...
 
bool Paused [get, set]
 Paused More...
 
bool HighlightTransitions [get, set]
 Highlight when a cell is transitioning from life to death More...
 
bool CenterAlignedGrid [get, set]
 Align grid to the center More...
 
bool HideGUI [get, set]
 Hide GUI More...
 
TouchBehaviorEnum TouchBehavior [get, set]
 Touch behavior More...
 
WrapBehaviorEnum WrapBehavior [get, set]
 Wrap behavior More...
 

Detailed Description

Boolean cellular automata 2D.

Definition at line 22 of file GameOfLife.cs.

Constructor & Destructor Documentation

◆ GameOfLife() [1/2]

Automata.GameOfLife.GameOfLife ( )
inline

Create a standard game of life of scale 20.

Definition at line 27 of file GameOfLife.cs.

27 : this(20) { }

◆ GameOfLife() [2/2]

Automata.GameOfLife.GameOfLife ( int  scale)
inline

Create a Game of Life instance of custom scale.

Parameters
scaleScale

Definition at line 33 of file GameOfLife.cs.

33 : base(scale) { }

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