Выбор заполнения
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
#include "CellularAutomaton.h"
|
||||
|
||||
CellularAutomaton::CellularAutomaton(int width, int height) : m_fieldWidth(width), m_fieldHeight(height)
|
||||
CellularAutomaton::CellularAutomaton(int width, int height, bool fillWithRandom) : m_fieldWidth(width), m_fieldHeight(height)
|
||||
{
|
||||
field.resize(m_fieldHeight, std::vector<int>(m_fieldWidth, 0));
|
||||
fieldNextState.resize(m_fieldHeight, std::vector<int>(m_fieldWidth, 0));
|
||||
|
||||
//initializeRandom();
|
||||
initializeManual();
|
||||
if (fillWithRandom) initializeRandom();
|
||||
else initializeManual();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user