Exemplo n.º 1
0
 def test_alignCheck(self):
     A, B = (0, 0), (1, 1)
     self.assertFalse(ttt.alignCheck(A, B))
     self.assertFalse(ttt.alignCheck(B, A))
     A, B = (-1, -1), (-1, 0)
     self.assertTrue(ttt.alignCheck(A, B))
     self.assertTrue(ttt.alignCheck(B, A))
     A, B = (1, 1, 0), (-1, -1, 0)
     self.assertTrue(ttt.alignCheck(A, B, level='plane'))
Exemplo n.º 2
0
	def test_alignCheck(self):
		A, B = (0, 0), (1, 1)
		self.assertFalse(ttt.alignCheck(A, B))
		self.assertFalse(ttt.alignCheck(B, A))
		A, B = (-1, -1), (-1, 0)
		self.assertTrue(ttt.alignCheck(A, B))
		self.assertTrue(ttt.alignCheck(B, A))
		A, B = (1, 1, 0), (-1, -1, 0)
		self.assertTrue(ttt.alignCheck(A, B, level='plane'))
Exemplo n.º 3
0
 def test_tripleAlignCheck(self):
     A, B, C = (-1, 0), (0, 0), (1, 0)
     allAligned = ttt.alignCheck(A, B) and \
         ttt.alignCheck(B, C) and \
         ttt.alignCheck(C, A)
     self.assertTrue(allAligned)
     A, B, C = (-1, -1), (0, 0), (1, 1)
     allAligned = ttt.alignCheck(A, B) and \
         ttt.alignCheck(B, C) and \
         ttt.alignCheck(C, A)
     self.assertFalse(allAligned)
Exemplo n.º 4
0
	def test_tripleAlignCheck(self):
		A, B, C = (-1, 0), (0, 0), (1, 0)
		allAligned = ttt.alignCheck(A, B) and \
					 ttt.alignCheck(B, C) and \
					 ttt.alignCheck(C, A)
		self.assertTrue(allAligned)
		A, B, C = (-1, -1), (0, 0), (1, 1)
		allAligned = ttt.alignCheck(A, B) and \
					 ttt.alignCheck(B, C) and \
					 ttt.alignCheck(C, A)
		self.assertFalse(allAligned)