score={}

function score.create()
    score.surf=surf.new(32*o2aX,96*o2aX)
    surf.target(score.surf)
    surf.cls(16)
    draw.surf(0,0,16*o2aX,9*o2aX,5*o2aX,9*o2aX,16*o2aX,9*o2aX,true)
    draw.surf(32*o2aX,64*o2aX,8*o2aX,8*o2aX,0,0)       draw.surf(48*o2aX,72*o2aX,8*o2aX,8*o2aX,8*o2aX,0)       draw.surf(48*o2aX,72*o2aX,8*o2aX,8*o2aX,16*o2aX,0)       draw.surf(40*o2aX,64*o2aX,8*o2aX,8*o2aX,24*o2aX,0)
    draw.surf(48*o2aX,64*o2aX,8*o2aX,8*o2aX,0,8*o2aX)  draw.surf(56*o2aX,64*o2aX,8*o2aX,8*o2aX,24*o2aX,8*o2aX) draw.surf(48*o2aX,64*o2aX,8*o2aX,8*o2aX,0,16*o2aX)       draw.surf(56*o2aX,64*o2aX,8*o2aX,8*o2aX,24*o2aX,16*o2aX)
    draw.surf(32*o2aX,64*o2aX,8*o2aX,8*o2aX,0,24*o2aX) draw.surf(48*o2aX,72*o2aX,8*o2aX,8*o2aX,8*o2aX,24*o2aX) draw.surf(48*o2aX,72*o2aX,8*o2aX,8*o2aX,16*o2aX,24*o2aX) draw.surf(40*o2aX,64*o2aX,8*o2aX,8*o2aX,24*o2aX,24*o2aX)
    draw.surf(48*o2aX,64*o2aX,8*o2aX,8*o2aX,0,32*o2aX) draw.surf(56*o2aX,64*o2aX,8*o2aX,8*o2aX,24*o2aX,32*o2aX)
    draw.surf(32*o2aX,64*o2aX,8*o2aX,8*o2aX,0,40*o2aX) draw.surf(48*o2aX,72*o2aX,8*o2aX,8*o2aX,8*o2aX,40*o2aX) draw.surf(48*o2aX,72*o2aX,8*o2aX,8*o2aX,16*o2aX,40*o2aX) draw.surf(40*o2aX,64*o2aX,8*o2aX,8*o2aX,24*o2aX,40*o2aX)

    draw.surf(48*o2aX,64*o2aX,8*o2aX,8*o2aX,0,48*o2aX) draw.surf(56*o2aX,64*o2aX,8*o2aX,8*o2aX,24*o2aX,48*o2aX) draw.surf(48*o2aX,64*o2aX,8*o2aX,8*o2aX,0,56*o2aX)       draw.surf(56*o2aX,64*o2aX,8*o2aX,8*o2aX,24*o2aX,56*o2aX)
    draw.surf(48*o2aX,64*o2aX,8*o2aX,8*o2aX,0,64*o2aX) draw.surf(56*o2aX,64*o2aX,8*o2aX,8*o2aX,24*o2aX,64*o2aX) --draw.surf(48*o2aX,64*o2aX,8*o2aX,8*o2aX,0,72*o2aX)     draw.surf(56*o2aX,64*o2aX,8*o2aX,8*o2aX,24*o2aX,72*o2aX)
    draw.surf(32*o2aX,64*o2aX,8*o2aX,8*o2aX,0,72*o2aX) draw.surf(48*o2aX,72*o2aX,8*o2aX,8*o2aX,8*o2aX,72*o2aX)  draw.surf(48*o2aX,72*o2aX,8*o2aX,8*o2aX,16*o2aX,72*o2aX) draw.surf(40*o2aX,64*o2aX,8*o2aX,8*o2aX,24*o2aX,72*o2aX)
    draw.surf(48*o2aX,64*o2aX,8*o2aX,8*o2aX,0,80*o2aX) draw.surf(56*o2aX,64*o2aX,8*o2aX,8*o2aX,24*o2aX,80*o2aX) draw.surf(48*o2aX,64*o2aX,8*o2aX,8*o2aX,0,88*o2aX)       draw.surf(56*o2aX,64*o2aX,8*o2aX,8*o2aX,24*o2aX,88*o2aX)
    -- draw.text("jail",6*o2aX,77*o2aX,2)
    -- draw.text("games",8*o2aX, 82*o2aX,2)
    -- draw.text("2023",9*o2aX,89*o2aX,1)
	arc_text("jail", 6*o2aX, 77*o2aX, 2)
    arc_text("games",8*o2aX, 82*o2aX, 2)
    arc_text("2026", 9*o2aX, 89*o2aX, 1)
    draw.rectf(06*o2aX,30*o2aX,2*o2aX,8*o2aX,03)
    draw.rectf(09*o2aX,30*o2aX,2*o2aX,8*o2aX,08)
    draw.rectf(12*o2aX,30*o2aX,2*o2aX,8*o2aX,08)
    draw.rectf(15*o2aX,30*o2aX,2*o2aX,8*o2aX,10)
    draw.rectf(18*o2aX,30*o2aX,2*o2aX,8*o2aX,10)
    draw.rectf(21*o2aX,30*o2aX,2*o2aX,8*o2aX,10)
    draw.rectf(24*o2aX,30*o2aX,2*o2aX,8*o2aX,10)
    surf.target(0)
end

function score.draw()
    surf.source(score.surf)
    draw.surf(0,0,32*o2aX,96*o2aX,96*o2aX,0)
    surf.source(tiles)
    if abad.objects.gorro~=nil then draw.surf(96*o2aX,32*o2aX,16*o2aX,16*o2aX,99*o2aX,44*o2aX) end
    if abad.objects.peu~=nil then draw.surf(112*o2aX,32*o2aX,16*o2aX,16*o2aX,109*o2aX,44*o2aX) end
    if abad.objects.gps~=nil then draw.surf(112*o2aX,48*o2aX,16*o2aX,16*o2aX,100*o2aX,55*o2aX) end

    if abad.objects.clau_premiere~=nil then draw.surf(112*o2aX,8*o2aX,8*o2aX,8*o2aX,104*o2aX,48*o2aX) end
    if abad.objects.clau_elalien~=nil then  draw.surf(120*o2aX,8*o2aX,8*o2aX,8*o2aX,112*o2aX,48*o2aX) end

    if abad.objects.bol~=nil then draw.surf(112*o2aX,88*o2aX,16*o2aX,8*o2aX,104*o2aX,46*o2aX) end
end