Выбор граничных условий
This commit is contained in:
@@ -42,7 +42,13 @@ int main()
|
||||
cout << "Заполнить поле случайными значениями? (yes/no)\n";
|
||||
bool fillWithRandom = userApprove();
|
||||
|
||||
CellularAutomaton ca(fieldWidth, fieldHeight, fillWithRandom);
|
||||
cout << "\nВыберите граничные условия:\n"
|
||||
"Нулевые (0)\n"
|
||||
"Единичные (1)\n"
|
||||
"Торроидальные (2)\n\n";
|
||||
BoundaryCondition boundaryCondition = static_cast<BoundaryCondition>(inputNumber(0, 2));
|
||||
|
||||
CellularAutomaton ca(fieldWidth, fieldHeight, fillWithRandom, boundaryCondition);
|
||||
clear();
|
||||
|
||||
cout << "\nИтерация 0:\n";
|
||||
@@ -55,7 +61,7 @@ int main()
|
||||
ca.displayField();
|
||||
}
|
||||
|
||||
cout << "Нажмите на enter, чтобы продолжить...";
|
||||
cout << "\nНажмите на enter, чтобы продолжить...";
|
||||
waitForEnter();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user