mvp готово

This commit is contained in:
2024-12-03 14:56:17 +03:00
parent 2e9fad26d8
commit 9eda3b8a1a
3 changed files with 52 additions and 2 deletions

View File

@@ -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;
};