From c2d40778f028414285cd316cc39465009c3eefaf Mon Sep 17 00:00:00 2001 From: Thefeli73 Date: Mon, 5 Oct 2020 18:28:59 +0200 Subject: [PATCH] =?UTF-8?q?wrapper=20s=C3=A5=20man=20kan=20k=C3=B6ra=20m?= =?UTF-8?q?=C3=A5nga=20games=20i=20rad=20(ej=20paralaliserad)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- launcher.py | 7 +++++++ main.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 launcher.py diff --git a/launcher.py b/launcher.py new file mode 100644 index 0000000..c922d71 --- /dev/null +++ b/launcher.py @@ -0,0 +1,7 @@ +import main +number_of_launches = 6 +result_list = [] +for i in range(number_of_launches): + result_list.append(main.main()) +for result in result_list: + print("Game " + result[0] + " had a score of: " + str(result[1])) \ No newline at end of file diff --git a/main.py b/main.py index cf40c9b..b9b967b 100644 --- a/main.py +++ b/main.py @@ -48,7 +48,7 @@ def main(): exit() print("Done with game: " + game_layer.game_state.game_id) print("Final score was: " + str(game_layer.get_score()["finalScore"])) - + return (game_layer.game_state.game_id, game_layer.get_score()["finalScore"]) def take_turn(): if not usePrebuiltStrategy: