require("test/setup")

local Ball = require("ball")

function testMarkUncatchable()
    local ball = Ball.new(playdate.graphics.animator)
    luaunit.assertIsTrue(ball.catchable, "Ball should start catchable")
    ball:markUncatchable()
    luaunit.assertIsFalse(ball.catchable, "Ball should not be catchable immediately after mark")
    playdate.timer.lastTimer.mockCompletion()
    luaunit.assertIsTrue(ball.catchable, "Ball should return to catchability after its timer expires")
end

os.exit(luaunit.LuaUnit.run())
