local utils = require "lib.utils.utils"
--- @class TileGrid : Grid
local map = setmetatable({}, require "lib.level.grid.base")
map.__index = map

--- create new map
--- @param type "procedural"|"handmaded"
--- @param template Procedural|Handmaded
--- @param size? Vec3
local function new(type, template, size)
    local tMap = require('lib.level.' .. type).new(template, size)
    return setmetatable({ __grid = tMap }, map)
end

function map:draw()
    utils.each(self.__grid, function(el)
        el:draw()
    end)
end

return { new = new }
