mirror of
https://github.com/onyx-and-iris/aoc2024.git
synced 2026-04-09 02:23:36 +00:00
pass graph as last arg
This commit is contained in:
@@ -31,11 +31,11 @@ func Solve(buf []byte) (int, error) {
|
||||
return safetyFactor, nil
|
||||
}
|
||||
|
||||
func calculateQuadrants(graph *graph) []int {
|
||||
topLeft := graph.quadrant(0, len(graph.data[0])/2, 0, len(graph.data)/2)
|
||||
topRight := graph.quadrant(len(graph.data[0])/2+1, len(graph.data[0]), 0, len(graph.data)/2)
|
||||
bottomLeft := graph.quadrant(0, len(graph.data[0])/2, len(graph.data)/2+1, len(graph.data))
|
||||
bottomRight := graph.quadrant(len(graph.data[0])/2+1, len(graph.data[0]), len(graph.data)/2+1, len(graph.data))
|
||||
func calculateQuadrants(g *graph) []int {
|
||||
topLeft := g.quadrant(0, len(g.data[0])/2, 0, len(g.data)/2)
|
||||
topRight := g.quadrant(len(g.data[0])/2+1, len(g.data[0]), 0, len(g.data)/2)
|
||||
bottomLeft := g.quadrant(0, len(g.data[0])/2, len(g.data)/2+1, len(g.data))
|
||||
bottomRight := g.quadrant(len(g.data[0])/2+1, len(g.data[0]), len(g.data)/2+1, len(g.data))
|
||||
|
||||
return []int{topLeft, topRight, bottomLeft, bottomRight}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user