mvp готово
This commit is contained in:
@@ -6,14 +6,19 @@
|
||||
|
||||
class CellularAutomaton
|
||||
{
|
||||
static const unsigned int functionValues = 0b00000110100000000010110010110110;
|
||||
|
||||
int m_fieldWidth, m_fieldHeight;
|
||||
std::vector<std::vector<int>> field;
|
||||
std::vector<std::vector<int>> fieldNextState;
|
||||
|
||||
void initializeRandom();
|
||||
int getCellState(int x, int y) const;
|
||||
int getNeighborhoodIndex(int x, int y) const;
|
||||
public:
|
||||
CellularAutomaton(int width, int height);
|
||||
|
||||
|
||||
void update();
|
||||
void displayField() const;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user