mirror of
https://github.com/Crocmagnon/advent-of-code.git
synced 2024-12-22 05:41:51 +01:00
Add old 2020 day 17
This commit is contained in:
parent
2393ce0618
commit
0f1e1f7c3f
3 changed files with 28 additions and 0 deletions
28
2020/day17_conway_cubes.py
Normal file
28
2020/day17_conway_cubes.py
Normal file
|
@ -0,0 +1,28 @@
|
|||
def main(filename: str, expected_part_1: int = None, expected_part_2: int = None):
|
||||
print(f"\n+ Running on {filename}")
|
||||
with open(filename) as f:
|
||||
data = f.read().strip().split("\n")
|
||||
|
||||
counter_part_1 = solve_part_1(data)
|
||||
|
||||
print(f"1. Found {counter_part_1}")
|
||||
if expected_part_1:
|
||||
assert expected_part_1 == counter_part_1
|
||||
|
||||
counter_part_2 = solve_part_2(data)
|
||||
print(f"2. Found {counter_part_2}")
|
||||
if expected_part_2:
|
||||
assert expected_part_2 == counter_part_2
|
||||
|
||||
|
||||
def solve_part_1(data):
|
||||
return 0
|
||||
|
||||
|
||||
def solve_part_2(data):
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main("inputs/day17-test1")
|
||||
main("inputs/day17")
|
0
2020/inputs/day17
Normal file
0
2020/inputs/day17
Normal file
0
2020/inputs/day17-test1
Normal file
0
2020/inputs/day17-test1
Normal file
Loading…
Reference in a new issue