public Controller(LifeCanvas board) { _board = board; IsRunning = false; _timer = new System.Threading.Timer(o => { _board.Update(); }, null, System.Threading.Timeout.Infinite, System.Threading.Timeout.Infinite); }
private void Play(object sender, RoutedEventArgs e) { LifeCanvas.Play(); if (LifeCanvas.IsPlaying) { PlayButton.Content = "Pause"; } else { PlayButton.Content = "Play"; } }
private void Clear(object send, RoutedEventArgs e) { LifeCanvas.Clear(); }
private void Randomize(object send, RoutedEventArgs e) { LifeCanvas.Randomize(); }