local world = display.newGroup() group:insert(world) local movable = display.newGroup() group:insert(movable) for i=1, 8 do for j=1, 8 do local value = gameMap[i][j] if tileFactory[value] then local mobile gameMap[i][j], mobile = tileFactory[value](i, j) world:insert(gameMap[i][j]) if mobile then movable:insert(mobile) end end end end
Comments