Skip to content

Commit c1a0cb5

Browse files
committed
AoC 2022 Day 17 - fix
1 parent 9c764ce commit c1a0cb5

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/main/python/AoC2022_17.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,10 +158,7 @@ def drop(drop_idx: int) -> State:
158158
drops += 1
159159
if drops == requested_drops:
160160
return stack.top
161-
if drops >= LOOP_TRESHOLD:
162-
assert (
163-
len(states.get(state, [])) > 1
164-
), f"No loop found in {drops} drops"
161+
if drops >= LOOP_TRESHOLD and len(states.get(state, [])) > 1:
165162
cycles = states[state]
166163
loop_size = cycles[1].cycle - cycles[0].cycle
167164
diff = cycles[1].top - cycles[0].top

0 commit comments

Comments
 (0)