public void LivingTests() { //dead stays dead GameOfLife test1 = new GameOfLife(3, 3); test1.grid[1, 1] = false; Assert.IsFalse(test1.LivingLivesOrDies(1, 1)); //living with zero living neighbors dies GameOfLife test2 = new GameOfLife(3, 3); test2.grid[1, 1] = true; Assert.IsFalse(test2.LivingLivesOrDies(1, 1)); //living with 1 living neighbor dies GameOfLife test3 = new GameOfLife(3, 3); test3.grid[1, 1] = true; test3.grid[1, 0] = true; Assert.IsFalse(test3.LivingLivesOrDies(1, 1)); //living with 2 living neighbors lives GameOfLife test4 = new GameOfLife(3, 3); test4.grid[1, 1] = true; test4.grid[1, 0] = true; test4.grid[1, 2] = true; Assert.IsTrue(test4.LivingLivesOrDies(1, 1)); //living with 3 living neighbors lives GameOfLife test5 = new GameOfLife(3, 3); test5.grid[1, 1] = true; test5.grid[0, 0] = true; test5.grid[1, 0] = true; test5.grid[2, 0] = true; Assert.IsTrue(test5.LivingLivesOrDies(1, 1)); //living with 4 (or more) living neighbors dies GameOfLife test6 = new GameOfLife(3, 3); test6.grid[1, 1] = true; test6.grid[0, 0] = true; test6.grid[1, 0] = true; test6.grid[2, 0] = true; test6.grid[1, 2] = true; Assert.IsFalse(test6.LivingLivesOrDies(1, 1)); }