def stat_comparer(player, stat, stat_value1, stat_value2, year1, year2):
    """
    Compares how a given players selected stat has changed between game editions

    Parameters
    ----------
    player
        The player being assessed (str)
    stat
        The stat being assessed (str)
    stat_value1
        The stat value in the more recent edition (int)
    stat_value2
        The stat value in the less recent edition (int)
    year1
        The more recent game year (int)
    year2
        The less recent game year (int)

    Returns
    -------
        A string describing if the player has improved, stayed the same or got worse
    """
    diff = stat_value1 - stat_value2
    if diff > 0:
        return f"{player} has improved {stat} by {str(diff)} points between fifa{year2} and fifa{year1}"
    elif diff == 0:
        return f"{player} has stayed the same at {stat} between fifa{year2} and fifa{year1}"
    elif diff < 0:
        return f"{player} has got worse at {stat} by {str(diff*-1)} points between fifa{year2} and fifa{year1}"
    else:
        return f"{stat} is not in both game verisons"