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