private void Form1_Load(object sender, EventArgs e) { bmp = new Bitmap(gridBox.Width, gridBox.Height); gpx = Graphics.FromImage(bmp); gridBox.Image = bmp; // Initialize the CA here. langtons = new LangtonsLoop.Rule(); theCA = new World(gridBox.Width / DIVISOR, gridBox.Height / DIVISOR, langtons); updateGraphics(); gridBox.Refresh(); Console.WriteLine("The CA has been created."); }
public Cell(World world, CellState initialState, Rule rule) { this.world = world; this.currentState = initialState; this.rule = rule; }
private void resetButton_Click(object sender, EventArgs e) { theCA = new World(gridBox.Width / DIVISOR, gridBox.Height / DIVISOR, langtons); updateGraphics(); gridBox.Refresh(); }