def test_count_pop_3(self): x = Life(3, 10, [['.','.','*','.','.','.','.','.','*','.'], ['.','.','.','.','.','.','.','.','.','*'], ['.','.','*','.','.','*','*','.','.','*']]) x.moat_grid() x.count_pop() self.assertEqual(x.population, 7)
def test_count_pop_1(self): x = Life(2, 15, [['.','.','*','.','.','.','.','.','*','.','.','.','.','.','.'], ['.','-','.','.','.','.','.','.','.','*','.','.','.','.','.']]) x.moat_grid() x.count_pop() self.assertEqual(x.population, 3)