def test_cant_move_outside_boundaries(self): mars = Rover(self.landscape, (0, 0), Direction.N) self.assertFalse(mars.can_move((-4, 0))) self.assertFalse(mars.can_move((0, 12))) self.assertFalse(mars.can_move((11, 3))) self.assertFalse(mars.can_move((4, -2)))
def test_position_has_obstacles(self): mars = Rover(self.landscape, (0, 0), Direction.N) self.assertTrue(mars.can_move((4, 0))) self.assertFalse(mars.can_move((0, 3)))