all latent changes, undisclosed and without warranty.

This commit is contained in:
2014-10-20 18:47:28 +02:00
parent 8411ed858c
commit 10c557dea3
10 changed files with 180 additions and 23 deletions

View File

@@ -5,13 +5,25 @@
"""
class Battle(object):
__slots__ = ['players',
'teams',
'time_start',
'time_end',]
def __init__(self, parent=None):
# parent is a log-session usually
pass
self.players = []
self.teams = []
self.time_start = None
self.time_end = None
self.owner = None
def battle_factory(logs):
''' takes a log session and returns the battles in it
makes a preliminary scan for information
'''
if logs.combat_log and logs.game_log:
# without these it does not make sense
# check combat_log
pass
return []

28
game/screener.py Normal file
View File

@@ -0,0 +1,28 @@
#
#
#
"""
Screener Module.
Upon receiving a logfile, the screener module tries a first pass to retrieve the informations:
- who am i? am i in steam?
- which os do i use? whats the date? other specifics?
- battles, when did they begin, when did they end, which players were in it, which teams (game.log)
It should act as a factory for a second, more in depth parsing mechanism, which can retrieve and
manage the rest of the details.
"""
class Information:
def __init__(self):
self.steam_id = None # steam id
self.steam_username = None # optional steam username.
self.username = None # ingame username.
self.uid = None # does not change.
self.pid = None # changes per battle. needed once to identify pilot.
class Screener(object):
def __init__(self):
pass