Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- return function (mapfile, terrains)
- local new = {}
- for line in io.lines(mapfile) do
- local h = 1
- local row = {}
- for point in line:gmatch('.') do
- row[h] = terrains[point]
- h = h + 1
- end
- table.insert(new, row)
- end
- return new
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement