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