Ejemplo n.º 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)
Ejemplo n.º 2
0
def plotaGraficoPorPosicao(game):
    obj = model.DiceGame(game)
    GamePlots(obj).byPosition()    
Ejemplo n.º 3
0
def plotaGraficoPorPontos(game):
    obj = model.DiceGame(game)
    GamePlots(obj).byPoints()
Ejemplo n.º 4
0
def calculaIncertezaPDD(game):
    obj = model.DiceGame(game)
    value = UncertaintyPDD(game=obj, ignored=0)
    return value.getMeasureValue()  
Ejemplo n.º 5
0
def calculaMudancasLideranca(game):
    obj = model.DiceGame(game)
    value = LeadChange(game=obj, ignored=0)
    return value.getMeasureValue()  
Ejemplo n.º 6
0
def calculaDramaPorPosicao(game):
    obj = model.DiceGame(game)
    value = DramaByPositionUp2First(game=obj, ignored=0)
    return value.getMeasureValue()  
Ejemplo n.º 7
0
def calculaDramaPorCaminho(game):
    obj = model.DiceGame(game)
    value = DramaByPaths(game=obj, ignored=0)
    return value.getMeasureValue()