Clarify magic number

This commit is contained in:
Daniel Flanagan 2020-12-05 08:03:03 -06:00
parent b9a91d78ab
commit 7b5c3ff06d
Signed by: lytedev
GPG key ID: 5B2020A0F9921EF4

View file

@ -25,6 +25,6 @@ proc part2*(s: Stream): int =
for l in s.lines(): for l in s.lines():
let id = cast[int](toId(row(l[0 .. 6]), col(l[7 .. ^1]))) let id = cast[int](toId(row(l[0 .. 6]), col(l[7 .. ^1])))
ids.incl(id) ids.incl(id)
for i in 1..890: for i in 1..890: # 890 is my answer from part 1
if ids.contains(i+1) and ids.contains(i-1) and not ids.contains(i): if ids.contains(i+1) and ids.contains(i-1) and not ids.contains(i):
return i return i