From 2a9e39188556af15b6379671bcd584588c233dd4 Mon Sep 17 00:00:00 2001 From: Stefan Harmuth Date: Wed, 30 Dec 2020 07:35:29 +0100 Subject: [PATCH] adapt to updated tools module --- day18/day.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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 == '#' {