private void UpdateGameStep() { ClearGrid(); DrawGrid(); genLabel.Text = LifeGrid.Generations.ToString(); popLabel.Text = CellsCount.ToString(); }
private void GridClick(object sender, MouseEventArgs e) { if (LifeGrid != null) { switch (patternBox.SelectedIndex) { case 0: CurrentPattern = Patterns.OneCell; break; case 1: CurrentPattern = Patterns.Blinker; break; case 2: CurrentPattern = Patterns.Block; break; case 3: CurrentPattern = Patterns.Glider; break; case 4: CurrentPattern = Patterns.Python; break; case 5: CurrentPattern = Patterns.ZdrShip; break; default: CurrentPattern = Patterns.OneCell; break; } LifeGrid.DrawPatternOnCells(e.X, e.Y, CurrentPattern); ClearGrid(); DrawGrid(); } popLabel.Text = CellsCount.ToString(); }