wrapper så man kan köra många games i rad (ej paralaliserad)
This commit is contained in:
parent
36521b7bf7
commit
c2d40778f0
7
launcher.py
Normal file
7
launcher.py
Normal file
@ -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]))
|
2
main.py
2
main.py
@ -48,7 +48,7 @@ def main():
|
|||||||
exit()
|
exit()
|
||||||
print("Done with game: " + game_layer.game_state.game_id)
|
print("Done with game: " + game_layer.game_state.game_id)
|
||||||
print("Final score was: " + str(game_layer.get_score()["finalScore"]))
|
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():
|
def take_turn():
|
||||||
if not usePrebuiltStrategy:
|
if not usePrebuiltStrategy:
|
||||||
|
Reference in New Issue
Block a user