day 9
This commit is contained in:
parent
19cb10b1f4
commit
7c0eee5e0b
@ -14,9 +14,6 @@ const DEBUG = false
|
||||
var debugGrid geometry.Grid[byte]
|
||||
|
||||
func initDebugGrid(points [][]int) {
|
||||
if !DEBUG {
|
||||
return
|
||||
}
|
||||
var gridEnd geometry.Point
|
||||
for _, point := range points {
|
||||
gridEnd.Line = max(point[0], gridEnd.Line)
|
||||
@ -44,7 +41,10 @@ func Part2(ctx aoc.Context) (result int, err error) {
|
||||
point[1], point[0] = point[0], point[1]
|
||||
}
|
||||
|
||||
initDebugGrid(points)
|
||||
if DEBUG {
|
||||
initDebugGrid(points)
|
||||
}
|
||||
|
||||
mainPolygon := createMainPolygon(points)
|
||||
rectangles := day9FindRectangles(points)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user