mirror of
https://github.com/onyx-and-iris/aoc2024.git
synced 2025-01-09 22:30:47 +00:00
remove unused functions
This commit is contained in:
parent
503082d822
commit
fa02cb3bc7
@ -1,7 +1,6 @@
|
|||||||
package one
|
package one
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"slices"
|
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -30,11 +29,3 @@ func (g *graph) isOutOfBounds(p point) bool {
|
|||||||
func (g *graph) valueAt(p point) rune {
|
func (g *graph) valueAt(p point) rune {
|
||||||
return rune(g.data[p.y][p.x])
|
return rune(g.data[p.y][p.x])
|
||||||
}
|
}
|
||||||
|
|
||||||
func (g *graph) debug(path []point) string {
|
|
||||||
temp := slices.Clone(g.data)
|
|
||||||
for _, pos := range path {
|
|
||||||
temp[pos.y] = replaceAtIndex(temp[pos.y], '+', pos.x)
|
|
||||||
}
|
|
||||||
return strings.Join(temp, "\n")
|
|
||||||
}
|
|
||||||
|
@ -37,9 +37,3 @@ func parseLines(r io.Reader) (*graph, error) {
|
|||||||
|
|
||||||
return graph, nil
|
return graph, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func replaceAtIndex(s string, r rune, i int) string {
|
|
||||||
out := []rune(s)
|
|
||||||
out[i] = r
|
|
||||||
return string(out)
|
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user