mirror of
https://github.com/onyx-and-iris/aoc2024.git
synced 2026-04-09 02:23:36 +00:00
remove internal/util
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -54,8 +54,7 @@ func Solve(buf []byte) (int, error) {
|
||||
|
||||
var numLoops int
|
||||
for range conc {
|
||||
res := <-isLoop
|
||||
if res {
|
||||
if <-isLoop {
|
||||
numLoops++
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user