public Form1() { InitializeComponent(); pen = new Pen(Color.FromName("ControlDark"), 1); buffer = Graphics.FromHwnd(panelView.Handle); img = new Bitmap(panelView.Width, panelView.Height, buffer); rect = new Rectangle(0, 0, panelView.Width, panelView.Height); g = Graphics.FromImage(img); g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias; world = new World(panelView.Width, panelView.Height); evolution = new Evolution(world); UpdateInfo(); UpdateKBTree(); }
private void btnEvoReset_Click(object sender, EventArgs e) { evolution = new Evolution(world); }