diff --git a/2020/22/22.py b/2020/22/22.py index da1e4b6..0be12cd 100644 --- a/2020/22/22.py +++ b/2020/22/22.py @@ -30,11 +30,9 @@ def normalGame(p1,p2): return [p1,p2] def recurseGame(p1,p2,n): - print("start subgame of level "+str(n)) rounds = [] while len(p1) > 0 and len(p2) > 0: if [p1,p2] in rounds: - print("subgame level " + str(n) + " has ended") return [p1,[]] if p1[0] <= len(p1)-1 and p2[0] <= len(p2)-1: res = recurseGame(copy.deepcopy(p1[1:(p1[0]+1)]),copy.deepcopy(p2[1:(p2[0]+1)]),n+1) @@ -55,7 +53,6 @@ def recurseGame(p1,p2,n): rounds.append([copy.deepcopy(p1),copy.deepcopy(p2)]) p1 = res[0] p2 = res[1] - print("subgame level "+str(n)+" has ended") return[p1,p2] @@ -79,4 +76,4 @@ scnorm = calcScore(norm[0]) if len(norm[0])>0 else calcScore(norm[1]) rec = recurseGame(copy.deepcopy(p1),copy.deepcopy(p2),0) screc = calcScore(rec[0]) if len(rec[0])>0 else calcScore(rec[1]) print("Normal game winner has score of " + str(scnorm)) -print("Recursive game winner has score of " + str(screc)) \ No newline at end of file +print("Recursive game winner has score of " + str(screc))