class PokerController(): def __init__(self): self.USER = Player('Bobsleigh37', 0) self.FILEPATH = "" self.pokerTextFile = PokerTextFile() self.pokerStats = PokerStats() def setFilePath(self, filePath): self.FILEPATH = filePath def loadPokerTextFile(self): self.pokerTextFile.load(self.FILEPATH, self.USER) def getHandsList(self): return self.pokerTextFile.hands def getHandsNet(self): return self.pokerStats.handsNet(self.pokerTextFile.hands) #print(filecontent.load(filepath, Player('Bobsleigh37', 0))) # TODO: Handle exceptions with try catch def getPartialSum(self): return self.pokerStats.handsPartialSum(self.getHandsList()) def getAverageGain(self): return self.pokerStats.avgGain(self.getHandsList()) def getMaxGain(self): return self.pokerStats.maxGain(self.getHandsList()) def getMaxLoss(self): return self.pokerStats.maxLoss(self.getHandsList()) def getNumberOfHands(self): return len(self.getHandsList())
def __init__(self): self.USER = Player('Bobsleigh37', 0) self.FILEPATH = "" self.pokerTextFile = PokerTextFile() self.pokerStats = PokerStats()