From 3a396c8c47b229dd4d55eaf6bb07484b412f27f1 Mon Sep 17 00:00:00 2001 From: Stefan Harmuth Date: Wed, 23 Dec 2020 12:54:10 +0100 Subject: [PATCH] day23: correct naming --- day23.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/day23.py b/day23.py index b9e6ee7..241633f 100644 --- a/day23.py +++ b/day23.py @@ -11,7 +11,7 @@ class Cup: self.right = right -def buildDoubleLinkedListDict(cup_list): +def buildLinkedListDict(cup_list): cups = {} left_cup = None first_cup = None @@ -47,7 +47,7 @@ def play(cups, current_cup, max_label): def part1(test_mode=False): my_input = aoclib.getInputAs2DArray(day=DAY, return_type=int, test=test_mode) - cups, current_cup = buildDoubleLinkedListDict(my_input[0]) + cups, current_cup = buildLinkedListDict(my_input[0]) for _ in range(100): cups, current_cup = play(cups, current_cup, 9) @@ -63,7 +63,7 @@ def part1(test_mode=False): def part2(test_mode=False): my_input = aoclib.getInputAs2DArray(day=DAY, return_type=int, test=test_mode) - cups, current_cup = buildDoubleLinkedListDict(my_input[0] + list(range(max(my_input[0]) + 1, 1000001))) + cups, current_cup = buildLinkedListDict(my_input[0] + list(range(max(my_input[0]) + 1, 1000001))) for _ in range(10000000): cups, current_cup = play(cups, current_cup, 1000000)