From 0c5fd3ecfc2aebde5786441caffb072ce97ee2d7 Mon Sep 17 00:00:00 2001 From: Timothy Johnson Date: Sat, 22 May 2021 22:51:13 -0400 Subject: [PATCH] Make list of strategy folders dynamic --- code/prisonersDilemma.py | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/code/prisonersDilemma.py b/code/prisonersDilemma.py index c396bbb..5656063 100644 --- a/code/prisonersDilemma.py +++ b/code/prisonersDilemma.py @@ -47,20 +47,9 @@ args = parser.parse_args() -STRATEGY_FOLDERS = [ - "exampleStrats", - "valadaptive", - "nekiwo", - "edward", - "misc", - "saffron", - "aaaa-trsh", - "phoenix", - "l4vr0v", - "smough" -] -if args.use_slow: - STRATEGY_FOLDERS.append("slow") +STRATEGY_FOLDERS = [p for p in os.listdir() if os.path.isdir(p)] +if not args.use_slow: + STRATEGY_FOLDERS.remove("slow") RESULTS_FILE = "results.txt" RESULTS_HTML = "results.html" RESULTS_JSON = "results.json"