Example #1
0
 /* Random button click event handler. */
 private void LifeRandom(object sender, EventArgs e)
 {
     currentGeneration    = Game.InitializeGame();
     Game.generationCount = 1;
     frames.Clear();
     textBox1.Text = string.Format("{0}, Generation: {1}", Game.GetCellStats(currentGeneration), Game.generationCount);
     pictureBox1.Invalidate();
 }
Example #2
0
 public Form1()
 {
     InitializeComponent();
     currentGeneration = Game.InitializeGame();
     frames            = new List <byte[]>();
     timer1.Interval   = Properties.Settings.Default.TickRate;
     timer1.Tick      += new EventHandler(timerTick);
     textBox1.Text     = string.Format("{0}, Generation: {1}", Game.GetCellStats(currentGeneration), Game.generationCount++);
 }