public MainWindow() { InitializeComponent(); _gameMatrix = new GameMatrix(40, 40); _rules = ProcessRules.DefaultRules(); _timer = new Timer { Interval = TimeSpan.FromSeconds(.5).TotalMilliseconds, }; _timer.Elapsed += UpdateBoard; _gameMatrix.Activate(_gameMatrix.RandomPoints().Take((_gameMatrix.Height * _gameMatrix.Width) / 2).ToArray()); Loaded += OnLoaded; const byte i = 241; _colorOff = new SolidColorBrush(new Color { A = 255, R = i, B = i, G = i }); _colorOn = new SolidColorBrush(Colors.Gray); }