From a282338f292c91f4e3ffb14f4462c8b66b507745 Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Thu, 26 Dec 2024 22:55:23 +0000 Subject: [PATCH] remove bounds check for first neighbour. --- day-04/internal/one/solve.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/day-04/internal/one/solve.go b/day-04/internal/one/solve.go index b70faef..fe8a460 100644 --- a/day-04/internal/one/solve.go +++ b/day-04/internal/one/solve.go @@ -20,10 +20,6 @@ func Solve(buf []byte) (int, error) { current := newPoint(j, i) if graph.valueAt(current) == 'X' { for _, n := range neighbours(current) { - if graph.isOutOfBounds(n) { - continue - } - if checkNeighbours(graph, n, "MAS") { sum++ }