private void btnRandomize_Click(object sender, EventArgs e) { _lifeGame.Randomize(_probability); _stepNumber = 0; updateFormVisuals(); }
private void runTest(int gridSize) { LifeGame lifeSim = new LifeGame(gridSize); lifeSim.Randomize(.25); int startCount = lifeSim.LiveCellCount; _startTime = DateTime.Now; for (int i = 0; i < 1000; i++) { lifeSim.Step(); } _stopTime = DateTime.Now; MessageBox.Show("Initial population of " + startCount + ".\n\n1000 random generations took " + (_stopTime - _startTime)); }