diff --git a/main.py b/day_1.py similarity index 100% rename from main.py rename to day_1.py diff --git a/day_2.py b/day_2.py new file mode 100644 index 0000000..fb30856 --- /dev/null +++ b/day_2.py @@ -0,0 +1,25 @@ +import aocd +from dotenv import load_dotenv + +load_dotenv() +puzzle_input = aocd.get_data(day=2, year=2022) + +round_result = { + "A X":4, + "B X":1, + "C X":7, + "A Y":8, + "B Y":5, + "C Y":2, + "A Z":3, + "B Z":9, + "C Z":6, +} + +strategy_score = 0 +moves_list = puzzle_input.split('\n') +for move in moves_list: + strategy_score = strategy_score + round_result[move] + +print(strategy_score) +