local map = ...

function map:on_opening_transition_finished()
    local mov = sol.movement.create("straight")
    mov:set_angle(0)
    mov:start(entity)

    local steps = 0

    sol.timer.start(map, 2, function()
        local angle = mov:get_angle()
        mov:set_angle(angle - math.rad(3))

        ---This should not crash after accumulation of non-rounded negative angles
        _ = entity:get_facing_position()

        ---After roughly 200 steps, if the previous function does not crash (should around 135-136 attempts), it is considered stable enough
        steps = steps + 1
        if steps >= 200 then
            sol.main.exit()
        end

        return true
    end)
end
