def test_future_3(self): x = Life(5, 3, [['.','*','.'], ['.','.','.'], ['*','.','*'], ['*','*','*'], ['.','.','*']]) x.moat_grid() x.count() x.future() self.assertEqual(x.grid[2][3].state, '.')
def test_future_4(self): x = Life(5, 3, [['-','0','-'], ['-','-','-'], ['-','-','-'], ['-','-','-'], ['-','-','-']]) x.moat_grid() x.count() x.future() self.assertEqual(x.grid[2][2].state, '-')
def test_count_3(self): x = Life(5, 3, [['.','*','.'], ['.','.','.'], ['*','.','*'], ['*','.','*'], ['.','.','*']]) x.moat_grid() x.count() self.assertEqual(x.grid[1][2].count, 0)