Solution for 11.1
This commit is contained in:
parent
bd7cc5ce68
commit
a409571bd8
3 changed files with 104 additions and 0 deletions
23
2018/internal/day11/debug.go
Normal file
23
2018/internal/day11/debug.go
Normal file
|
@ -0,0 +1,23 @@
|
|||
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()
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue