package one import ( "strings" ) type graph struct { startPoint point data []string } 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] = replaceAtIndex(g.data[loc.Y], '+', loc.X) } } return g.String() }