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()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-12-12 21:46:57 +00:00
|
|
|
func DebugPrintNxN(grid [][]int, x, y, n int) {
|
|
|
|
for i := y; i < y+n; i++ {
|
|
|
|
for j := x; j < x+n; j++ {
|
2018-12-12 21:14:57 +00:00
|
|
|
fmt.Printf("%3d", grid[i][j])
|
|
|
|
}
|
|
|
|
fmt.Println()
|
|
|
|
}
|
|
|
|
}
|