2023 Day 18 Complete!

This commit is contained in:
2023-12-18 06:54:10 -06:00
parent d64a18280f
commit c3ecf7a911
6 changed files with 856 additions and 1 deletions

View File

@@ -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