示例#1
0
	def test_is_conway_5(self):
		x = Life(5, 3, [['0','0','0'], ['*','-','-'], ['-','-','*'], ['-','-','*'], ['-','-','*']])
		x.moat_grid()
		x.grid[2][3].type_cell = 'Fredkin'
		self.assertEqual(False, x.is_conway(2, 3))
示例#2
0
	def test_is_conway_6(self):
		x = Life(5, 3, [['0','0','0'], ['*','-','-'], ['-','-','*'], ['-','-','*'], ['-','-','*']])
		x.moat_grid()
		x.grid[0][0].type_cell = 'Conway'
		self.assertEqual(True, x.is_conway(0, 0))
示例#3
0
	def test_is_conway_2(self):
		x = Life(5, 3, [['.','.','.'], ['*','.','.'], ['*','*','*'], ['.','.','*'], ['.','.','*']])
		x.moat_grid()
		x.grid[2][3].type_cell = 'Conway'
		self.assertEqual(True, x.is_conway(2, 3))