public MainWindow()
        {
            currentBoard = new RealGameOfLife(3);
            currentBoard.Pattern_Selector("toad");
            dispatcherTimer = new DispatcherTimer();

            InitializeComponent();

            TheListView.ItemsSource = currentBoard.ToList();
            dispatcherTimer.Tick += dispatcherTimerClick;
            dispatcherTimer.Interval = TimeSpan.FromSeconds((double)RunSpeed.Value);
        }
Example #2
0
 public void ArrayToListWorksOnAllFalseThreeByThree()
 {
     List<List<bool>> Actual = new List<List<bool>>();
     Actual.Add(new List<bool>(new bool[] { false, false, false }));
     Actual.Add(new List<bool>(new bool[] { false, false, false }));
     Actual.Add(new List<bool>(new bool[] { false, false, false }));
     RealGameOfLife Arrays = new RealGameOfLife(3);
     List<List<bool>> Expected = Arrays.ToList();
     for (int i = 0; i < Expected.Count; i++)
     {
         CollectionAssert.AreEqual(Expected[i], Actual[i]);
     }
 }