remove internal/util

This commit is contained in:
2025-01-07 17:23:11 +00:00
parent 064232967b
commit fd057f88ed
6 changed files with 16 additions and 22 deletions

View File

@@ -2,8 +2,6 @@ package two
import (
"strings"
"github.com/onyx-and-iris/aoc2024/day-06/internal/util"
)
type graph struct {
@@ -26,7 +24,7 @@ func (g *graph) valueAt(x, y int) rune {
func (g *graph) trace(visited map[point]struct{}) string {
for loc := range visited {
if !(rune(g.data[loc.y][loc.x]) == 'O') {
g.data[loc.y] = util.ReplaceAtIndex(g.data[loc.y], '+', loc.x)
g.data[loc.y] = replaceAtIndex(g.data[loc.y], '+', loc.x)
}
}

View File

@@ -54,8 +54,7 @@ func Solve(buf []byte) (int, error) {
var numLoops int
for range conc {
res := <-isLoop
if res {
if <-isLoop {
numLoops++
}
}