def __init__(self, ladderFilePath, useCache = True, timeRange=None): self.games = [] self.players = {} self.achievements = Achievements() self._recentlyActivePlayers = (-1, []) self._gameStore = CachingGameStore(ladderFilePath, useCache) self._ladderTime = {'now': timeRange == None, 'range': timeRange} self._theTime = time.time() self._gameStore.loadGames(self, self._ladderTime)
def __init__(self, ladderFilePath, useCache=True, timeRange=None, transforms=None, games=None): self.games = [] self.players = {} self.achievements = Achievements() self._skillChange = Elo() self._recentlyActivePlayers = (-1, []) self._ladderTime = {'now': timeRange is None, 'range': timeRange} self._theTime = time.time() self._gameStore = None if games is None: self._gameStore = CachingGameStore(ladderFilePath, useCache) transforms = PresetTransforms.transforms_for_full_games( self._ladderTime) if transforms is None else transforms games = self._gameStore.loadGames(self._ladderTime, transforms) self._loadGamesIntoLadder(games)
def __init__(self): self.games = [] self.players = {} self.achievements = Achievements() self._recentlyActivePlayers = []