input: Write a function to create an object-oriented structure to solve a maze using Python. The function should return the solution path of the maze as a list of integers, where each integer represents the distance from the start to the current position. If the maze is empty or no solution is found, the function should return an empty list.
  assert solve_maze(2, 2, [[1, 0], [1, 1]]) == [2]
  assert solve_maze(3, 3, [[1, 0, 0], [1, 1, 0], [0, 1, 1]]) == [4]
  assert solve_maze(1, 1, [[1]]) == [0]
  assert solve_maze(2, 2, [[0, 0], [0, 0]]) == []
  assert solve_maze(0, 0, []) == []
output: def solve_maze(rows, cols, maze):
      if not maze:
          return []
      
      start = (0, 0)
      end = (rows - 1, cols - 1)
      queue = [(start, 0)]
      visited = set()
      directions = [(0, 1), (1, 0), (0, -1), (-1, 0)]
      
      while queue:
          (current_pos, distance) = queue.pop(0)
          if current_pos == end:
              return [distance]
          if current_pos in visited:
              continue
          visited.add(current_pos)
          
          for direction in directions:
              new_pos = (current_pos[0] + direction[0], current_pos[1] + direction[1])
              if 0 <= new_pos[0] < rows and 0 <= new_pos[1] < cols and maze[new_pos[0]][new_pos[1]] == 1:
                  queue.append((new_pos, distance + 1))
      
      return []