コード例 #1
0
def winnerPieChart(games):
    players = model.DiceGame(games[0]).getPlayers()
    numberPlayers = len(players)
    numberWins = []
    for i in range(numberPlayers):
        numberWins.append(0)
    for game in games:
        obj = model.DiceGame(game)
        winner = obj.getWinner()
        numberWins[winnerPosition(winner)] = numberWins[winnerPosition(winner)] + 1        
    print (numberWins)
    plotaPieChart(numberWins)
コード例 #2
0
def plotaGraficoPorPosicao(game):
    obj = model.DiceGame(game)
    GamePlots(obj).byPosition()    
コード例 #3
0
def plotaGraficoPorPontos(game):
    obj = model.DiceGame(game)
    GamePlots(obj).byPoints()
コード例 #4
0
def calculaIncertezaPDD(game):
    obj = model.DiceGame(game)
    value = UncertaintyPDD(game=obj, ignored=0)
    return value.getMeasureValue()  
コード例 #5
0
def calculaMudancasLideranca(game):
    obj = model.DiceGame(game)
    value = LeadChange(game=obj, ignored=0)
    return value.getMeasureValue()  
コード例 #6
0
def calculaDramaPorPosicao(game):
    obj = model.DiceGame(game)
    value = DramaByPositionUp2First(game=obj, ignored=0)
    return value.getMeasureValue()  
コード例 #7
0
def calculaDramaPorCaminho(game):
    obj = model.DiceGame(game)
    value = DramaByPaths(game=obj, ignored=0)
    return value.getMeasureValue()