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))
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))
def test_diagonal_location(self): loc_1 = Point(0, 0) loc_2 = Point(1, 1) self.assertFalse(loc_1.is_adjacent_to(loc_2))
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))