def display_races(races, results=False, limit=16): """ Display list of races in console for debugging """ for race in races: racedate = get_datetime(race) displayinfo.align(race['id'], str(racedate) + str(racedate.weekday()), race['game']['abbrev'], race['goal'], limit=limit) if results: display_results(race)
def display_results(*races): """ Display results from race for debugging """ for race in races: results = race['results'] displayinfo.alignheader('place', 'player', 'time', 'msg', limit=16) for result in results: place = result['place'] if place == 9999: place = '' result['time'] = 'DQ' elif place == 9998: place = '' result['time'] = 'Quit' displayinfo.align(place, result['player'], convert_time(result['time']), result['message'], limit=16) print('\n')