aoc2023/day-16/debug.go

31 lines
542 B
Go
Raw Permalink Normal View History

2023-12-17 15:31:11 +00:00
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
}