-- idea 1
--? function find_path_for_crate(level, src, crate_to_move, dst)
--? local done = {}
--? local cands = {}
--? table.insert(cands, {x=src.x, y=src.y})
--? while #cands > 0 do
--? local cand = table.remove(cands, 1)
--? local x,y = cand.x, cand.y
--? if x == dst.x and y == dst.y then return cand end
--? if y >= 1 and y <= lh and x >= 1 and x <= lw and not done[y][x] then
--? done[y][x] = true
--? local curr = level[y][x]
--? if curr ~= CELL_WALL and curr ~= CELL_CRATE and curr ~= CELL_CRATE_ON_TARGET then
--? table.insert(cands, {x=x-1, y=y, dir='left', prev=cand})
--? table.insert(cands, {x=x+1, y=y, dir='right', prev=cand})
--? table.insert(cands, {x=x, y=y-1, dir='up', prev=cand})
--? table.insert(cands, {x=x, y=y+1, dir='down', prev=cand})
--? elseif curr == CELL_CRATE and crate_id[y][x] == cid then
--? -- TODO: actually simulate a real move of a crate
--? table.insert(cands, {x=x-1, y=y, dir='left', prev=cand})
--? table.insert(cands, {x=x+1, y=y, dir='right', prev=cand})
--? table.insert(cands, {x=x, y=y-1, dir='up', prev=cand})
--? table.insert(cands, {x=x, y=y+1, dir='down', prev=cand})
--? end end end end