Mercurial > lbo > hg > aoc22
changeset 28:72bbee9f4d9e
day 15 - add explanation
author | Lewin Bormann <lbo@spheniscida.de> |
---|---|
date | Sat, 17 Dec 2022 13:49:24 +0100 |
parents | 457820e3609e |
children | 3c7df4d9b8cb |
files | 15/15.jl |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/15/15.jl Sat Dec 17 13:47:46 2022 +0100 +++ b/15/15.jl Sat Dec 17 13:49:24 2022 +0100 @@ -55,7 +55,8 @@ end function find_distress_beacon(bs::Vector{Beacon}, minc=0, maxc=20)::Set{Point} - # Check borders of sensor's coverage area + # Check borders of sensor's coverage area - as there is only one point to check, + # it must be directly outside a sensor's coverage area. v = Set{Point}(); isvalid(p) = p.x >= minc && p.x <= maxc && p.y >= minc && p.y <= maxc; for b in bs