From f96520e34aa0d4ed60b886fd2387c45fd508297c Mon Sep 17 00:00:00 2001 From: Mika Suhonen Date: Wed, 14 Dec 2022 18:48:06 +0200 Subject: [PATCH] Clean up --- 14/n.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/14/n.py b/14/n.py index 0978e68..3c97649 100644 --- a/14/n.py +++ b/14/n.py @@ -43,8 +43,7 @@ for s in range(10000000): current = (Y, X) # print(current) - moving = True - while (moving): + while (True): down = (current[0]+1, current[1]) left = (current[0]+1, current[1]-1) @@ -57,7 +56,7 @@ for s in range(10000000): if down not in cave: current = down if current[0] >= floor: - moving = False + break elif left not in cave: current = left elif right not in cave: