Esempio n. 1
0
 /* Called by timer during every step of simulation of game. */
 private void timerTick(object sender, EventArgs e)
 {
     /* Save current frame before generating next generation. */
     GifUtils.SaveFrame(ref frames, pictureBox1);
     /* Generate next generation */
     Game.NewGeneration(ref currentGeneration);
     textBox1.Text = string.Format("{0}, Generation: {1}", Game.GetCellStats(currentGeneration), Game.generationCount++);
     pictureBox1.Invalidate();
 }