YouWinBanner = class()

function YouWinBanner:init(x)
    -- you can accept and set parameters here
    self.fontColor = color(49, 255, 0, 255)
    self.textPosition = vec2(WIDTH/2,HEIGHT/2)
end

function YouWinBanner:draw()
    pushStyle()
    fill(self.fontColor)
    textAlign(CENTER)
    fontSize(100)
    font("Optima-ExtraBlack")
    text("YOU WIN!!", self.textPosition.x, self.textPosition.y)
    popStyle()
    self:randomizeColor()
end

function YouWinBanner:randomizeColor(touch)
    local randR, randG, randB = math.random(256) - 1, math.random(256) - 1, math.random(256) - 1
    self.fontColor = color(randR, randG, randB, 255)
end
