mirror of
https://github.com/onyx-and-iris/aoc2023.git
synced 2024-11-15 15:10:49 +00:00
31 lines
542 B
Go
31 lines
542 B
Go
|
package main
|
||
|
|
||
|
import "fmt"
|
||
|
|
||
|
func printDebug(move *mover, lines []string) int {
|
||
|
num := 0
|
||
|
for i, line := range lines {
|
||
|
for j, r := range line {
|
||
|
inNodes := func(c coords) bool {
|
||
|
for _, node := range move.nodes {
|
||
|
if c.X == node.X && c.Y == node.Y {
|
||
|
return true
|
||
|
}
|
||
|
}
|
||
|
return false
|
||
|
}(newCoords(j, i))
|
||
|
|
||
|
if inNodes {
|
||
|
fmt.Printf("#")
|
||
|
num++
|
||
|
//} else if r == '|' || r == '\\' || r == '/' || r == '-' {
|
||
|
//fmt.Printf(".")
|
||
|
} else {
|
||
|
fmt.Printf("%c", r)
|
||
|
}
|
||
|
}
|
||
|
fmt.Println()
|
||
|
}
|
||
|
return num
|
||
|
}
|