diff --git a/get_sheet.py b/get_sheet.py index bd228ad..46c50af 100644 --- a/get_sheet.py +++ b/get_sheet.py @@ -247,14 +247,15 @@ def create_replay_links(ids: List[int], strategy: str): outfile = Path('out/{}_links.csv'.format(strategy)) with open(outfile, 'w') as f: writer = csv.writer(f) - writer.writerow(["Game ID", "{} Replay Link".format(strategy)]) + writer.writerow(["Game ID", "Result", "{} Replay Link".format(strategy)]) for game_id in ids: replay = get_game_json(game_id, strategy) instance, actions = parse_json_game(replay) game = HanabLiveGameState(instance) for action in actions: game.make_action(action) - writer.writerow([game_id, link(game)]) + bdrs, termination = describe_game(replay) + writer.writerow([game_id, 'Win' if game.is_won() else termination, link(game)]) x = pandas.read_csv(outfile) x.to_html(outfile.with_suffix('.html'), render_links=True)