let info = {}

const draw = ctx => {
    ctx.save()
    let i = 1
    ctx.font = '18px sans'
    ctx.fillStyle = '#fff'
    ctx.shadowColor = 'black'
    ctx.textAlign = 'left'
    ctx.shadowBlur = 3
    for (let key in info) {
        ctx.fillText(info[key], 10, 22 * i)
        i++
    }
    ctx.restore()
}

const set = (key, text) => {
    info[key] = text
}

const clear = () => {
    info = {}
}

export default {
    draw,
    set,
    clear
}
