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