Beispiel #1
0
    avgScores[6] = goalScores[6] - ((numPlayersLeft * fgpAvg) + paolo.scores[6])
    avgScores[7] = goalScores[7] - ((numPlayersLeft * ftpAvg) + paolo.scores[7])
    avgScores[8] = goalScores[8] - ((numPlayersLeft * tpmAvg) + paolo.scores[8])
    print "Average Scores left: " + str(avgScores)
    mods = [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0]
    for i in range(0, 9):
        if avgScores[i] / goalScores[i] > 0.2:
            mods[i] = 2.0
        elif avgScores[i] / goalScores[i] > 0.1:
            mods[i] = 1.5
    des = paolo.getDesirabilities(players, mods)
    for i in range(0, 20):
        print des[i][0] + "- " + str(des[i][1])


dr = DraftRanks()
year = 2013
se = Season()
sortedPlayers = se.calcSeason("season/thisStats2.txt", year, 3, 1, 2, 28, 23, 22, 24, 25, 26, 10, 19, 11, 7)
players = {}
# Set up the stats for calculating when a stat is low
# turn these into arrays
pts = {}
ast = {}
reb = {}
stl = {}
blk = {}
tos = {}
fgp = {}
ftp = {}
tpm = {}
Beispiel #2
0
 def getDesirabilities(self, players, mods):
   dr = DraftRanks()
   desirabilities = {}
   for player in players:
     desirabilities[player] = dr.calcDesirability(self.scores, players[player].getScores(), mods)
   return sorted(desirabilities.items(), key=operator.itemgetter(1), reverse=True)