adapt to updated tools module
This commit is contained in:
parent
7d03482c4a
commit
2a9e391885
10
day18/day.go
10
day18/day.go
@ -4,9 +4,9 @@ import (
|
||||
"tools"
|
||||
)
|
||||
|
||||
func play(grid tools.ToggleGrid, stuckCorners bool) {
|
||||
neighbours := tools.NewIntGrid()
|
||||
for thisCoord := range grid.GetCoordinates() {
|
||||
func play(grid tools.GridToggle, stuckCorners bool) {
|
||||
neighbours := tools.NewGridInt()
|
||||
for _, thisCoord := range grid.GetCoordinates() {
|
||||
for cx := thisCoord.X - 1; cx <= thisCoord.X+1; cx++ {
|
||||
for cy := thisCoord.Y - 1; cy <= thisCoord.Y+1; cy++ {
|
||||
if cy == thisCoord.Y && cx == thisCoord.X {
|
||||
@ -32,8 +32,8 @@ func play(grid tools.ToggleGrid, stuckCorners bool) {
|
||||
}
|
||||
}
|
||||
|
||||
func makeGridFromInput(input []string) tools.ToggleGrid {
|
||||
grid := tools.NewToogleGrid()
|
||||
func makeGridFromInput(input []string) tools.GridToggle {
|
||||
grid := tools.NewGridToggle()
|
||||
for y, line := range input {
|
||||
for x, c := range line {
|
||||
if c == '#' {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user