def pickban_mod(ah): mod = 0 infog = {} for h in parse_heroes(ah): infog[h] = pickbans.index(h) cutoff = math.ceil((float(len(alpha))/5)) for h in parse_heroes(ah): tier = math.ceil(float(infog[h]+1)/cutoff) mod += (math.ceil(tier)-1) # calculate tier return -mod*2
def get_hero_tier(hero): cutoff = math.ceil(float(len(alpha))/5) tier = math.ceil(float(pickbans.index(hero)+1)/cutoff) return int(tier)