package one import ( "strings" "github.com/onyx-and-iris/aoc2024/day-06/internal/util" ) type graph struct { data []string startPoint point } func newGraph() *graph { return &graph{} } func (g *graph) String() string { return strings.Join(g.data, "\n") } func (g *graph) debug(visited map[coords]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) } } return g.String() }