Day 6 part 1 solution.

This commit is contained in:
2024-12-07 00:43:14 +10:00
parent 921f03ec9d
commit baf45b78d1
2 changed files with 228 additions and 0 deletions

27
day6/test.py Normal file
View File

@@ -0,0 +1,27 @@
from solver import Simulation
test_data = r"""
....#.....
.........#
..........
..#.......
.......#..
..........
.#..^.....
........#.
#.........
......#...
""".strip()
def test_visited():
print("Beginning visited test")
sim = Simulation.from_string(test_data)
sim.run()
visited = sim.total_visited()
assert visited == 41
print("Visited test passed")
if __name__ == '__main__':
test_visited()