diff options
| author | Gustav Sörnäs <gusso230@student.liu.se> | 2019-12-18 23:06:03 +0100 |
|---|---|---|
| committer | Gustav Sörnäs <gusso230@student.liu.se> | 2019-12-18 23:06:03 +0100 |
| commit | 831997571a05919f469fec7c3f10a53a45c58e3f (patch) | |
| tree | 3fb43f69137b524d3df73e07fb226e316a224b72 /19 | |
| parent | f6442664931bff2f37027a0d0eaf706017b5537d (diff) | |
| download | aoc-831997571a05919f469fec7c3f10a53a45c58e3f.tar.gz | |
Add thoughts for d18
Diffstat (limited to '19')
| -rw-r--r-- | 19/py/d18.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/19/py/d18.py b/19/py/d18.py index 41ade0a..1b70c86 100644 --- a/19/py/d18.py +++ b/19/py/d18.py @@ -235,9 +235,9 @@ while True: neighbours = graph[last] for n in neighbours: - #TODO recognize cycles - #if n[0] in visited: - # continue + #TODO check if current state has been reached before and skip if it has + + # a state is (not really) a set of keys collected (:frozenset) and the current square if n[0].isupper() and n[0] not in unlocked: continue visited = visited.copy() |
