def player_rank(player):
    """Calculate a rank value for a player"""

    rank = float(((player['WIN'] * 25.0) + (player['CTF_SCORE'] * 5.0) + (player['SLAYER_SCORE'] / 2.0)) - (player['LOSS'] * 30.0))
    if rank < 0:
        rank = 0
    return rank