Ejemplo n.º 1
0
	def testShouldBeClose( self ):
		from classes.target import Target
		t1 = Target()
		t2 = Target()
		t1.x = 150
		t1.y = 150
		t2.x = 100
		t2.y = 100
		c = self.Helper.is_close(t1,t2)
		assert c == True, "objects are not close"
Ejemplo n.º 2
0
	def testShouldNotBeClose( self ):
		from classes.target import Target
		t1 = Target()
		t2 = Target()
		t1.x = 550
		t1.y = 550
		t2.x = 100
		t2.y = 100
		c = self.Helper.is_close(t1,t2)
		assert c == False, "objects close"
Ejemplo n.º 3
0
	def testShouldNotCollide( self ):
		from classes.target import Target
		t1 = Target()
		t2 = Target()
		t1.x = 200
		t1.y = 200
		t2.x = 100
		t2.y = 100
		c = self.Helper.is_collided(t1,t2)
		assert c == False, "collision detected"