diff --git a/day18/day.go b/day18/day.go index 7e5434a..baba46f 100644 --- a/day18/day.go +++ b/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 == '#' {