EHSDV6CTQRTUCXISCWCL32DDHLNENVUWOK6LL3B5NDW56QVYDNJQC
AHABKD5VEK5RSTM3CME4XJAHCVTHYV2D2WAWUGSJ6PBUCUI7CB3AC
4IBBQBYGBZDCXQO5C7H6UTWT67YJUJ7R6FH6UNHX4QGXOO47UUBQC
YYVOTWROJFENEAQ4M4VJPWLODTTX7BTAL3NQSTL2UKJ5VSOEH4JQC
GVX7YSQYURPWFSUWVUAORZJTQBJURWWNBNUGEZYFAUMX3X5LSACQC
X6AJODURS3K7O6ZNPOJLXFKI73E7OBRJRMBL66UHBDKFZXK4F6RAC
KCUJIKQ6POLGKI26YHZWTD242B7JOSGI4VO4XBSKAU66ARM3EIBQC
LYLOM4SPCNQX64J76E7WDGCXPJOJ2GTSLJCDREJJFZY46HGMCR3QC
function load_crate_id(level_state)
local next_crate_id = 1
local result = {}
for r,row in ipairs(level_state) do
local dest = {}
for c,cell in ipairs(row) do
if cell == CELL_CRATE or cell == CELL_CRATE_ON_TARGET then
table.insert(dest, next_crate_id)
next_crate_id = next_crate_id+1
else
table.insert(dest, false)
end
end
table.insert(result, dest)
end
return result
end