24 lines
364 B
Go
24 lines
364 B
Go
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()
|
|
}
|
|
}
|