def unemployment_rate(earning, earning_new, unemployment):
    """
    Args:
        earning:          how much money the player earned last round
        earning_new:      how much money the player earned this round
        unemployment:   unemployment rate of the player had last round

    Returns:            unemployment rate of the player has this round

    """

    # based on okuns law
    delta_unemployment = ((earning - earning_new) / earning) / 1.8
    new_unemployment = max(0, unemployment + delta_unemployment)

    return new_unemployment