示例#1
0
        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();
        }
示例#2
0
 private void btnEvoReset_Click(object sender, EventArgs e)
 {
     evolution = new Evolution(world);
 }