digger.lua

--[[ Digger ]]
ROT=require 'src.rot'

local update=false
function love.load()
    f  =ROT.Display(80, 24)
    dgr=ROT.Map.Digger(f:getWidth(), f:getHeight())
    update=true
end
function love.draw() f:draw() end
function calbak(x, y, val) f:write(val==1 and '#' or '.', x, y) end
function love.update()
    if update then
        update=false
        dgr:create(calbak)
        local rooms=dgr:getDoors()
        for k,v in pairs(rooms) do
            f:write('+', v.x, v.y)
        end
    end
end
function love.keypressed(key) update=true end
generated by LDoc 1.4.6 Last updated 2017-07-19 18:43:03