commit with optional input parameters

This commit is contained in:
taxicomics
2024-04-26 19:11:23 +00:00
parent 4cc2362dbb
commit 00a9debb4b
5 changed files with 34 additions and 8 deletions
+10 -6
View File
@@ -13,15 +13,19 @@ import contenders
games=[]
#keeping track of the games scores for later analysis
scores=[]
nr_of_rounds=30
nr_of_games=300
nr_of_rounds=30#int(input("How many should be played in a game?"))
nr_of_games=300#int(input("How many games should be played?"))
#XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
# Put YOUR functions down below
#XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
function1=contenders.random_positive_leaner
function2=contenders.random_positive_leaner
#XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
# Put YOUR function down below
#XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
function2=contenders.i_hate_certain_numbers
for i in range(nr_of_games):
helper_functions.play_game( games,function1,function2,nr_of_rounds)
scores.append(helper_functions.analyze_results(games))
games=[]
print("Played "+str(nr_of_games)+ " games with "+str(nr_of_rounds)+" rounds each.")
print("(A huge disparity of the average and median could hint at special behaviour)")
helper_functions.analyze_scores(scores)