2023 Day 18 Complete!
This commit is contained in:
@@ -44,7 +44,7 @@ func part2(m h.CoordByteMap, loop []h.Coordinate) {
|
||||
for x := m.TLX; x <= m.BRX; x++ {
|
||||
wrk := h.Coordinate{X: x, Y: y}
|
||||
wrkV := m.Get(wrk)
|
||||
if h.CoordListContains(wrk, loop) { //&& (wrkV == NS || wrkV == NE || wrkV == NW) {
|
||||
if h.CoordListContains(wrk, loop) {
|
||||
// This coordinate is part of the loop, so it can change the 'inside' flag
|
||||
// A corner _only_ changes the flag if the 'exiting' corner continues in the same direction
|
||||
// i.e.: L--J doesn't change the flag, L--7 does change the flag
|
||||
|
Reference in New Issue
Block a user