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
+15
View File
@@ -35,4 +35,19 @@ def random_positive_leaner(game_data,player_nr):
if random.randint(0,10)<6:
choice=True
#your cool code ended here
return choice
def i_hate_certain_numbers(game_data,player_nr):
opponent_nr=1-player_nr
hated_numbers=[7,13,17,23]
#for ease of use this is index of the opponents value
choice=True
#this function should return either true(coorperate) or false(defect)
#your cool code goes here
round_nr=len(game_data)
if round_nr in hated_numbers:
choice=False
#your cool code ended here
return choice