adventofcode/2018/internal/day11/debug.go

24 lines
364 B
Go
Raw Normal View History

2018-12-12 21:14:57 +00:00
package day11
import (
"fmt"
)
func DebugPrintGrid(grid [][]int) {
for y := 0; y < GridSize; y++ {
for x := 0; x < GridSize; x++ {
fmt.Printf("%3d", grid[y][x])
}
fmt.Println()
}
}
func DebugPrint5x5(grid [][]int, x, y int) {
for i := y - 1; i < y+4; i++ {
for j := x - 1; j < x+4; j++ {
fmt.Printf("%3d", grid[i][j])
}
fmt.Println()
}
}