Exemplo n.º 1
0
 def test_far_y_location(self):
     loc_1 = Point(0, 0)
     loc_2 = Point(0, 2)
     self.assertFalse(loc_1.is_adjacent_to(loc_2))
Exemplo n.º 2
0
 def test_adjacent_y_location(self):
     loc_1 = Point(0, 0)
     loc_2 = Point(0, 1)
     self.assertTrue(loc_1.is_adjacent_to(loc_2))
     self.assertTrue(loc_2.is_adjacent_to(loc_1))
Exemplo n.º 3
0
 def test_diagonal_location(self):
     loc_1 = Point(0, 0)
     loc_2 = Point(1, 1)
     self.assertFalse(loc_1.is_adjacent_to(loc_2))
Exemplo n.º 4
0
 def test_adjacent_x_location_reverse(self):
     loc_1 = Point(1, 0)
     loc_2 = Point(0, 0)
     self.assertTrue(loc_1.is_adjacent_to(loc_2))