--- @class Map --- @field atlas love.Image --- @field size Vec3|nil local map = {} map.__index = map --- create new map --- @param type "procedural"|"handmaded" --- @param template Procedural|Handmaded --- @param size? Vec3 local function new(type, template, size) map.size = size local tMap = require('lib.level.' .. type).new(template, size) return setmetatable(tMap, map) end function map:draw() for y = 0, self.size.y - 1 do for x = 0, self.size.x - 1 do love.graphics.draw(self.atlas, self[x][y], x, y, nil, 1 / 32, 1 / 32) end end end return { new = new }