Добавил функцию для подсчёта живых клеток

This commit is contained in:
2024-12-07 11:23:39 +03:00
parent a7043f4843
commit 772bc2446a
3 changed files with 20 additions and 0 deletions

View File

@@ -51,12 +51,14 @@ int main()
cout << "\nИтерация 0:\n";
ca.displayField();
//cout << ca.countLiveCells() << "\n";
for (int i = 0; i < iterationsCount; ++i)
{
cout << "\nИтерация " << i + 1 << ":\n";
ca.update();
ca.displayField();
//cout << ca.countLiveCells() << "\n";
}
cout << "\nНажмите на enter, чтобы продолжить...";